angelo-chan/koa2-starter: A koa2 startkit powered by graphql, mongoose, jwt, pas ...
开源软件名称:angelo-chan/koa2-starter
开源软件地址:https://github.com/angelo-chan/koa2-starter
开源编程语言:
JavaScript
96.5%
开源软件介绍:KOA2-Starter
Features
- 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
Getting Started
Prerequisites
Setup
-
Run npm install to install server dependencies.
-
Run mongod in a separate shell to keep an instance of the MongoDB Daemon running
-
Run redis-server in a seperate shell to keep an instance of the Redis Server running
Develop
- Run
gulp or make run to start a node server and watch the source code
Debug
- Select babel-node as node interceptor
- Start debug server/index.js in ide
Build
- Run
gulp build to build ci package
- Run
gulp prod to build prod package
Style
- import airbnb.xml to Editor => Code Style => JavaScript
- use
ALT + CMD + L to format the code
Dependency
|
请发表评论