README.md 1.1 KB

tsp_visualization_admin

tsp_view

QuickStart

see egg docs for more detail.

Development

$ npm i
$ npm run dev
$ open http://localhost:7001/

Deploy

$ npm start
$ npm stop

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.

add env

- 1.找到工程目录下的config文件夹,在这个文件夹下方根据原有的config.xxx.js复制新增一个config.xxx.js(xxx为环境变量,如dev)
- 2.可以根据环境修改config.xxx.js里的数据库地址等
- 3.找到工程目录下的package.json文件,找到json里key值为“scripts”
- 4.在“scripts”对应的vlaue下新增一个环境变量key 如sit 
    "sit": "egg-scripts start --env=sit --title=egg-server-faw-tsp-chart-admin",
    "环境": "egg-scripts start --env=环境 --title=egg-server-faw-tsp-chart-admin",
- 5.对应在dockerfile的启动上使用 npm run xxx,sit环境启动是npm run sit