- Node 17 and above
- NPM
- Docker
- Postgres
cd
into whatever directory you want work from.- Run
https://github.com/zerothebahdman/node-postgres.git
thencd
into the repo. - After cloning the project, run
cp .env .env.example
on your terminal to create a new.env
file from the.env.example
. - Run
yarn install
to install all the dependencies. - Run
yarn dev
to start the project in development mode. - Run
yarn build
to build the project for production. - Run
yarn start
to start the project in production mode.
- Create a database on your machine.
- For PostgreSQL
- Navigate into
src/database/prisma/schema.prisma
verify that inside the datasource db object provider is set to postgresql i.eprovider = "postgresql"
- Navigate into
Your database url in the `.env` file should as follows
DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"
mydb : The name of the databse you created on your machine
johndoe : The username of the database
randompassword : The password of the database
-
To migrate the database tables from prisma use
npx prisma migrate dev --name init --schema=./src/database/prisma/schema.prisma
-
To view your database on your browser use prisma studio
npx prisma studio --schema=./src/database/prisma/schema.prisma
Note If you have discovered a bug or have a feature suggestion, feel free to create an issue on Github.
Checkout the contributions guidelines
Dont forget to star or fork this if you like it
This project is licensed under the terms of the GPL license.