Run npm install
Create a .env file at the root of the project
Configure it as below
DATABASE_URL="postgresql://<username>:<password>@<host_name>:<port>/<database_name>?schema=public"
PORT=<port_number>(default: 80 - Windows | 8080 - Linux)
JWT_secret=<secter_token_string>
JWT_expire=<expiration_time> (ex.: 1m)
Run npm run devStart
- The Prisma ORM Prisma.io was used to simplify working with the db
- The PostgreSQL https://www.postgresql.org/ was used to store data
- Upon authorization or registration, the user receives a token. When new requests come, they are verified with middleware
- Endpoints are logically divided into routes (users, dishes, daily-dishes e.t.c) and moved to different files