# tsp_visualization_admin tsp_view ## QuickStart see [egg docs][egg] for more detail. ### Development ```bash $ npm i $ npm run dev $ open http://localhost:7001/ ``` ### Deploy ```bash $ 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](https://www.npmjs.com/package/autod) for more detail. [egg]: https://eggjs.org ### add env ```bash - 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 ```