项目作者: cedricVu

项目描述 :
Express CRUD boilerplate
高级语言: JavaScript
项目地址: git://github.com/cedricVu/express-todo-boilerplate.git
创建时间: 2018-11-03T09:14:52Z
项目社区:https://github.com/cedricVu/express-todo-boilerplate

开源协议:

下载


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:

  1. git clone --depth 1 https://github.com/cedricVu/NodeJs-Todo-Service.git
  2. cd Nodejs-todo-service
  3. rm -rf .git

Install dependencies:

  1. yarn install

Set environment variables:

  1. cp .env.example .env

Running in your local

  1. yarn start

Docker

  1. docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

Deploy

Set your server ip:

  1. DEPLOY_SERVER=127.0.0.1

Replace my Docker username with yours:

  1. nano deploy.sh

Run deploy script:

  1. sh ./deploy.sh

License

MIT License - Cedric