krish f5a5955656 | 10 months ago | |
---|---|---|
src | 10 months ago | |
.env | 3 years ago | |
.env.development | 10 months ago | |
.env.example | 3 years ago | |
.env.production | 10 months ago | |
.eslintrc.js | 10 months ago | |
.gitignore | 3 years ago | |
.prettierrc | 10 months ago | |
Dockerfile | 3 years ago | |
README.md | 10 months ago | |
deploy.sh | 3 years ago | |
docker-compose.dev.yml | 10 months ago | |
docker-compose.prod.yml | 10 months ago | |
docker-compose.test.yml | 10 months ago | |
docker-compose.yml | 10 months ago | |
package-lock.json | 10 months ago | |
package.json | 10 months ago | |
yarn.lock | 10 months ago |
This repository is exclusively meant for presenting samples of code.
The Files and Codes present in this repository are part of a running project. In order to ensure the security of the project several files have been intentionally removed. The codes are exclusively for viewing purpose and will not execute properly if tried.
Boilerplate/Generator/Starter Project for building RESTful APIs and microservices using Node.js, Express and MongoDB
git clone --depth 1 https://git.sentientgeeks.us/krish/sg-node-express-rest-api.git
cd sg-node-express-rest-api
rm -rf .git
yarn
cp .env.example .env
yarn dev
yarn start
# lint code with ESLint
yarn lint
# try to fix ESLint errors
yarn lint:fix
# lint and watch for changes
yarn lint:watch
# run all tests with Mocha
yarn test
# run unit tests
yarn test:unit
# run integration tests
yarn test:integration
# run all tests and watch for changes
yarn test:watch
# open nyc test coverage reports
yarn coverage
# run lint and tests
yarn validate
# show logs in production
pm2 logs
# generate and open api documentation
yarn docs
# run container locally
yarn docker:dev
# run container in production
yarn docker:prod
# run tests
yarn docker:test
Set your server ip:
DEPLOY_SERVER=127.0.0.1
Replace my Docker username with yours:
nano deploy.sh
Run deploy script:
yarn deploy