Nestjs backend starter kit with authentication
$ npm install
We can run the project with or without docker.
To run the server without Docker we need this pre-requisite:
- Mongo server running
- Redis server running
Rename .sample.env
to .env
and edit it as your needs to configure the app.
Commands
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# build image
$ docker build -t backend-api .
# run container from image
$ docker run -p 3000:3000 --volume 'pwd':/usr/src/app --network --env-file .env backend-api
# run using docker compose
$ docker-compose up
You can check out http://localhost:3000/docs for available APIs
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
-
Clone the Project
`git clone https://github.com/Fair-Trade-Fares-Ltd/FTF_Backend-API.git`
- make sure you have
node >= 14
installed - run
npm i
to install dependencies - use docker compose to run dependencies
- enable eslint/prettier in your IDE
- make sure you have
-
Create your Feature Branch
`git checkout -b feature/(task|scope)/AmazingFeature`
-
Commit your Changes
`git commit -m 'feat(task|scope): Add some AmazingFeature'`
Make sure you obey to commitlint commit message conventions
type(scope?): subject body? footer?
type
must be one of[build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test]
-
Push to the Branch
git push origin feature/(task|scope)/AmazingFeature
-
Open a Pull Request