- No transpilers, just vanilla javascript
- ES2017 latest features like Async/Await
- CORS enabled
- Uses yarn
- Express + MongoDB (Mongoose)
- Soft delete
- Uses Mongoose (Class, plugin ... )
- Docker support
- Uses helmet to set some HTTP headers for security
- Load environment variables from .env files with dotenv
- Request validation with joi
- Gzip compression with compression
- API documentation geratorion with swagger
- API docs view: :/swagger/view
- Monitoring with pm2
- Node v7.6+ or Docker
- [npm] or Yarn
Clone the repo and make it yours:
git clone --depth 1 https://github.com/cedricVu/NodeJs-Todo-Service.git
cd Nodejs-todo-service
rm -rf .git
Install dependencies:
yarn install
Set environment variables:
cp .env.example .env
yarn start
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
Set your server ip:
DEPLOY_SERVER=127.0.0.1
Replace my Docker username with yours:
nano deploy.sh
Run deploy script:
sh ./deploy.sh