-
Duplicate and rename .env.example to .env and provide all environment var
-
Provide right DB username,password,schema
npm i
npm run watch
- Open other terminal window and run dev server
npm run start:dev
docker-compose up --build
If you get DB does not exists, simply run this:
sh scripts/sh/initdb.sh
- seed - DB seed script, will insert dummy data
- watch - Watcher, for changes in TS files
- clean - Removes dist folder
- build - Compiles TS files, and spits JS version
- start - Start the server in prod mode
- start:dev - Start the server in dev mode
- lint - Lint the TS files with eslint
You can run this api over https now with the help of Caddy reverse proxy
Steps to enable HTTPS:
- Download and setup Caddy
- Open a new terminal and run
caddy run Caddyfile
in the root of project - Enjoy API over HTTPS now 👍
In future will move Caddy to Docker, so we dont need to install it seperately
Drop a pull request, and we will review and bring it to master
Give a ⭐️ if this project helped you!