Nestjs starter including Continous Deployment on Google Cloud, Kubernetes, Docker, Jenkins
- Node >= 10.16.0
$ npm install- Copy and rename
.env.development.exampleto.env(adjust mongo connection if not using default config) - Install dependencies
npm install - Run
npm start - Access interactive API doc from browser
http://localhost:3000
- Test and coverage report
npm run test:cov - Test e2e
npm run test:e2e
Run using docker-compose
- Run test (build and run both node and mongo containers)
# run jest test using docker
$ docker-compose run app npm test$ docker-compose run app npm run test:e2e
# run cov test using docker
$ docker-compose run app npm run test:cov
- Remove running container
# stop nestjs-starter container
$ docker-compose down --remove-orphans- Remove running images
$ docker rmi -f nestjs-starter_appRun using docker
- Build app only
# Build account-service
$ docker build -t nestjs-starter .- Run server
# run account-service using docker
$ docker run --name nestjs-starter -p 3000:3000 -i nestjs-starter npm start- Remove running container
# stop nestjs-starter container
$ docker rm -f nestjs-starter- Remove running images
$ docker rmi -f nestjs-starter# ability to run script
$ chmod a+x /scripts/remove-docker-services.sh
# run script
$ ./scripts/remove-docker-services.shDepends on installation, you may need to use
sudo