next-prisma-data-proxy

Stars
10

Next.js Prisma Data Platform Demo

This is an example blog app showing how to use the Prisma ORM with the Prisma Data Proxy in a Next.js app deployed to Vercel.

For comparison the blog uses two rendering approaches to display blog posts:

  • server-side rendering
  • static generation with incremental static re-generation

Docs for the Prisma Data Proxy

Installation

Clone the repo and install the dependencies:

# with npm
npm i

Start the database

docker-compose up -d

Set DATABASE_URL

Create .env by copying the example:

cp .env.example .env

Make sure that the DATABASE_URL has been set:

DATABASE_URL="postgresql://test-user:test-password@localhost:5432/vercel-prisma-data-proxy?schema=public"

Create the database with Prisma Migrate

npx prisma migrate dev

Run the App

# with npm
npm run dev
Badges
Extracted from project README