Skip to content

Commit a39de3b

Browse files
Arthur GambyArthur Gamby
authored andcommitted
content: add ai/nextjs.mdx file
1 parent fb68e27 commit a39de3b

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

content/900-ai/prompts/nextjs.mdx

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -474,48 +474,28 @@ Remember: There are NO EXCEPTIONS to these rules. Every requirement is MANDATORY
474474

475475
````
476476

477-
## Verify your setup
477+
## Running the application
478478

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:
480480

481-
### 1. Generate the Prisma Client
482-
483-
First, generate the Prisma Client with the correct configuration:
481+
**1. Generate the Prisma Client:**
484482

485483
```terminal
486484
npx prisma generate --no-engine
487485
```
488486

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:**
494488

495489
```terminal
496490
npm run db:studio
497491
```
498492

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.
503494

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:**
511496

512497
```terminal
513498
npm run dev
514499
```
515500

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

Comments
 (0)