You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/900-ai/prompts/nextjs.mdx
+7-27Lines changed: 7 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -474,48 +474,28 @@ Remember: There are NO EXCEPTIONS to these rules. Every requirement is MANDATORY
474
474
475
475
````
476
476
477
-
## Verify your setup
477
+
## Running the application
478
478
479
-
After following the prompt instructions and completing the setup, verify that everything is working correctly by testing your application locally.
479
+
Get your application running locally in three quick steps:
480
480
481
-
### 1. Generate the Prisma Client
482
-
483
-
First, generate the Prisma Client with the correct configuration:
481
+
**1. Generate the Prisma Client:**
484
482
485
483
```terminal
486
484
npx prisma generate --no-engine
487
485
```
488
486
489
-
This command generates the Prisma Client in your custom output directory (`app/generated/prisma`) without bundling the query engine, which is required when using Prisma Postgres with Accelerate.
490
-
491
-
### 2. View your data in Prisma Studio
492
-
493
-
Open Prisma Studio to inspect your database and verify the test data:
487
+
**2. View your database in Prisma Studio:**
494
488
495
489
```terminal
496
490
npm run db:studio
497
491
```
498
492
499
-
Prisma Studio will open in your browser at `localhost:5555`. You should see:
500
-
501
-
- Your `User` table in the left sidebar
502
-
- The test user that was created when you ran the test script (`scripts/test-database.ts`)
493
+
Prisma Studio opens at `localhost:5555` where you can inspect your `User` table and see the test user stored in your database.
503
494
504
-
:::tip
505
-
Prisma Studio provides a visual interface to view, create, update, and delete records in your database. It's an excellent tool for managing your data during development.
506
-
:::
507
-
508
-
### 3. Start the development server
509
-
510
-
Run your Next.js application locally to see the data fetched from your database:
495
+
**3. Start your Next.js development server:**
511
496
512
497
```terminal
513
498
npm run dev
514
499
```
515
500
516
-
Open your browser and navigate to `http://localhost:3000`. You should see:
517
-
518
-
- The test user's information displayed on the homepage
519
-
- Data fetched directly from your Prisma Postgres database using the Prisma Client
520
-
521
-
If you see the user data displayed correctly, congratulations! Your Next.js application is successfully integrated with Prisma ORM and Prisma Postgres.
501
+
Visit `http://localhost:3000` to see your Next.js application live, displaying your first user fetched directly from your Prisma Postgres database!
0 commit comments