Configuration
Database
How to configure your database
The project uses Prisma as the database ORM and PostgreSQL as the database.
Database URL
I recommend using Neon for your database hosting who provides a free tier for development. Wathever you can use any other provider or host your database on your own server, for example via Docker.
You need to set the DATABASE_URL
environment variable in your .env
file.
DATABASE_URL=postgresql://user:password@localhost:5432/database
Push the schema to the database
After setting the DATABASE_URL
environment variable, you can push the schema to the database by running the following command:
pnpm run prisma:push
This command will create the tables in the database based on the schema defined in the prisma/schema.prisma
file.