Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.03 KB

README.md

File metadata and controls

47 lines (30 loc) · 1.03 KB

rainbow

QuickStart

see egg docs for more detail.

Development

$ npm i
$ npm run init-database // create database
$ npm run insert  // insert label table default filed
$ npm run dev
$ open http://localhost:3001/

Deploy

$ pm2
pm2 deploy ecosystem.config.js production setup 初次上传代码
pm2 deploy ecosystem.config.js production // 上传代码并部署(以后)
$ webhook
localhost:8888/deploy  在push时候触发 服务器同步代码并重启

以上都部署开机自动重启服务

start up
pm2 start server.js -n rainbow --watch='app config database deploy'  --ignore-watch='node_modules logs run'

npm scripts

  • Use npm run lint to check code style.
  • Use npm test to run unit test.
  • Use npm run autod to auto detect dependencies upgrade, see autod for more detail.

接口形式

域名 + 端口号 /api/功能类型/具体端口 eg:127.0.0.1:3001/api/users/getUser