This is a Next.js project bootstrapped with create-next-app.
First, you need to create .env file in root directory with next variables:
DABASE_URL="postgresql://postgres:[password].???.supabase.co:5432/postgres"
SHADOW_DABASE_URL="postgresql://postgres:[password].???.supabase.co:5432/postgres_shadow"
Check Supabase docs for Prisma on how to create shadow db.
Then, run the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 with your browser to see the result.
The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.