For art testing environment publish code service
- download this package on your server.
- command
git clone https://github.com/yuguomin/art-static-service.git
- or any other way like scp...
- install global dependencies
- install yarn
- install node
- command
sudo yarn global add pm2
- install package dependencies
- use command cd this folder
- command
yarn install
- use command cd this folder
- command
yarn start
- will start server and listen on 9090 port, if you want to change, please write ecosystem.config.js env.PORT, and you can also open more service together
- command
yarn list
- will see pm2 progress management interface
- command
yarn close
- will use command => pm2 delete all
- will stop all pm2 manage process, If you just want to stop one of them, please use pm2 command
pm2 delete <id|name>
- url '/upload_static'
- methods POST PUT
- params
- file: use fs.createReadStream function
- path: The files will be tied there
- url '/', this will map to './static/frontend/'
- methods GET
use winston collect logs, path: '/logs/error.log' at present only collect code >= 400 message to log.
- look pm2 process
pm2 list
- delete one process
pm2 delete <id|name>
- delete all process
pm2 delete all
- open process
pm2 start <path>