Base Directory: ./backend
- Navigate to the
backend
directory -cd backend
- Run
npm install
- Navigate to the
backend
directory -cd backend
- Create
<environment-name>.env
file inside theenv
directory. - Open
sample.env
file. - Copy all REQUIRED env variables and paste them inside your current env file created in step #2.
- Set values for all the env variables you just copied in step #4.
- Create a new Postgres database
extr
. - Navigate to the
backend
directory -cd backend
- Run this to generate DB structure -
DATABASE_URL=postgres://<USERNAME>:<PASSWORD>@<HOSTNAME>:<PORT>/extr npm run migrate up
- Navigate to the
backend
directory -cd backend
- Run
npx tsc
to build the application for the first time. - Run
npm run watch:js
to turn on the watch mode for TS files. - Run
npm start