- integrate mongoose for mongo operation
- integrate ioredis for cache
- integrate gulp for build
- integrate pm2 for deploy
- integrate git-rev for server version
- integrate eslint for lint by airbnb rule
- integrate jwt for token generate and validation
- integrate apidoc for doc generate
- integrate graphql and graphiql for graphql support
- integrate morgan for logging
- integrate passport for authentication
- support ES7 async await
- suport database migration
- support multiple env
- support health check
- support routing
- Git
- Node.js and npm Node ^6.2.0, npm ^3.8.9
- gulp (
npm install -g gulp-cli) - MongoDB Mongo ^3.2.x - Keep a running daemon with
mongod - Redis-Server - Keep a running daemon with
redis-server
-
Run
npm installto install server dependencies. -
Run
mongodin a separate shell to keep an instance of the MongoDB Daemon running -
Run
redis-serverin a seperate shell to keep an instance of the Redis Server running
- Run
gulpormake runto start a node server and watch the source code
- Select babel-node as node interceptor
- Start debug server/index.js in ide
- Run
gulp buildto build ci package - Run
gulp prodto build prod package
- import airbnb.xml to Editor => Code Style => JavaScript
- use
ALT + CMD + Lto format the code