啓動程序:pm2 start <app_name|id|all>node
列舉進程:pm2 listweb
退出程序:pm2 stop <app_name|id|all>npm
重起應用:pm2 restartapp
程序信息:pm2 describe id|allspa
監控:pm2 monitrest
實時集中log處理: pm2 logscode
API:pm2 web (端口:9615 )blog
fs.js:747 return binding.mkdir(pathModule._makeLong(path), ^Error: ENOENT, no such file or directory 'E:\Users\dustin\.pm2' at Error (native) at Object.fs.mkdirSync (fs.js:747:18) at Object.CLI.pm2Init (C:\Users\dustin\AppData\Roaming\npm\node_modules\pm2\lib\CLI.js:37:8) at Object.<anonymous> (C:\Users\dustin\AppData\Roaming\npm\node_modules\pm2\bin\pm2:20:5) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) at startup (node.js:129:16)我愚笨的解決方法: 在E盤下建文件夾:
\Users\dustin