under construction
- nodeJS
- PostgreSQL database
-
Clone or download the repo
$ git clone https://github.com/Glup3/jetti-api -
Install NPM packages
$ npm install -
Copy the
.env.example, rename it to.env.env.example --> .env -
Set the
DATABASE_URLand other env varsDATABASE_URL="postgresql://postgres:password@localhost:5432/postgres" ... -
Migrate database
npx prisma migrate dev --preview-feature -
Run the server locally on port 4545 (default)
$ npm start
npx prisma generate
npx prisma migrate dev --name description_of_migration --preview-feature
npx prisma migrate dev --name description_of_migration --create-only --preview-feature
npx prisma migrate dev --preview-feature
npx prisma migrate deploy
npx prisma migrate reset --preview-feature
npx prisma db seed --preview-feature
It automatically generates a schema.dbml file when prisma generate is triggered. The file is located under prisma/dbml.
Copy the content to https://dbdiagram.io/d and it will show you the database structure as a diagram.
important note
Prisma generates code in node_modules/@generated and Heroku removes it automatically because it thinks that it is a devDependency. Set env NPM_CONFIG_PRODUCTION to false and it will not prune devDependencies.
