Copy and rename the .env.example
file in the project root using:
cp .env.example .env
Your .env
file should include the following:
DATABASE_URL="postgresql://[email protected]:26257/defaultdb"
Install dependencies via npm:
npm i
You can then launch the API and frontend of the application using:
npm run dev
Open http://localhost:3000 with your browser to see the result.
A docker-compose.yml
file is included in the root project directory. This runs any development service dependencies (such as CockroachDB) and can be run using:
docker-compose up
To sync your local database with the project schema, you should run npx prisma migrate dev
. You can access CockroachDB using http://0.0.0.0:8080.
npm run dev
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.