diff --git a/.env.example b/.env.example index a227a86..52936a9 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,6 @@ PORT=3000 SALT="this is a very insecure salt, change it" DB_NAME=mydb -DB_PROVIDER=postgres DB_HOST=db # db refers to the name of the service in docker-compose.yml DB_USER=johndoe DB_PASSWORD=randompassword diff --git a/README.md b/README.md index 204f36a..6fdc6d4 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,13 @@ See [cli/README.md](cli/README.md) for detailed instructions and library usage. **Requirements:** Node.js (tested on 18+, should work with 14+), and a SQL database (tested on PostgreSQL, should work with MySQL and SQLite). -Right now, my instance is using PostgreSQL on Vercel. However, it can be run using any SQL DB such as SQLite or MySQL. To use other backends, please update the provider in [schema.prisma](src/lib/server/prisma/schema.prisma) +Right now, my instance is using PostgreSQL on Vercel. ### .env Configuration +By default, it is configured to use PostgreSQL. However, it can be run using any SQL DB such as SQLite or MySQL. To use other backends, please update the provider in [schema.prisma](src/lib/server/prisma/schema.prisma). + - `DB_NAME` is the database name; -- `DB_PROVIDER` uses 'postgres' by default, but can be changed to MySQL or SQLite. - `DB_HOST` database host (defaults to 'db', but can be changed to aything like localhost) - `DB_USER` database user - `DB_PORT` database port 5432 diff --git a/src/lib/server/prisma/schema.prisma b/src/lib/server/prisma/schema.prisma index eaa917c..08a54bf 100644 --- a/src/lib/server/prisma/schema.prisma +++ b/src/lib/server/prisma/schema.prisma @@ -6,7 +6,7 @@ generator client { } datasource db { - provider = env("DB_PROVIDER") + provider = "postgresql" url = env("DATABASE_URL") }