终端关闭时,节点服务器关闭

时间:2019-04-24 15:31:34

标签: node.js ubuntu npm forever npm-start

我试图永久使用节点服务器作为后台进程。当我关闭油灰终端时,服务器仍然关闭。我在做什么?

命令:forever -c "npm start &" ./

package.json

  "name": "server",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "nodemon ./bin/www",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
     .....
  }
}

0 个答案:

没有答案