项目作者: cedricVu
项目描述 :
Express CRUD boilerplate
高级语言: JavaScript
项目地址: git://github.com/cedricVu/express-todo-boilerplate.git
Todo service
Features
- 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
Requirements
Getting Started
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
Running in your local
yarn start
Docker
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
Deploy
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
License
MIT License - Cedric