when the status is online i am running the port on 8014 its still not running
when i use pm2 start tools/srcServer.js
"scripts": {
"prestart": "babel-node tools/startMessage.js",
"start": "npm-run-all --parallel test:watch open:src",
"open:src": "babel-node tools/srcServer.js",
"test": "mocha --reporter progress tools/testSetup.js \"src/**/*.test.js\"",
"test:watch": "npm run test -- --watch",
"clean-dist": "npm run remove-dist && mkdir dist",
"remove-dist": "node_modules/.bin/rimraf ./dist",
"build:html": "babel-node tools/buildHtml.js",
"prebuild": "npm-run-all clean-dist test build:html",
"build": "babel-node tools/build.js",
"postbuild": "babel-node tools/distServer.js"
}
我正在使用npm start运行节点我需要运行节点才能永远运行服务器。
我尝试使用命令"永远启动-c" npm start" ./"它没有显示
答案 0 :(得分:0)
为什么不尝试使用PM2(节点流程管理器:http://pm2.keymetrics.io/)?
答案 1 :(得分:0)
要从npm start
运行pm2
,您可以运行pm2 start npm -- start
。这将运行在package.json start部分中编写的任何命令。