Forever + Nodemon running together

后端 未结 8 1437
刺人心
刺人心 2020-12-07 10:04

Is there any way to have both of this packages running together?

So basically I want to have best from both worlds. Running server automatically (and restarting when

8条回答
  •  执念已碎
    2020-12-07 10:07

    when using in the package.json use single quotes to make nodemon --existcrash as a single argument. "start": "forever -c 'nodemon --exitcrash' server.js"

    Output: app_1 | [nodemon] app crashed app_1 | error: Forever detected script exited with code: 1 app_1 | error: Script restart attempt #1 app_1 | [nodemon] 1.19.4 app_1 | [nodemon] to restart at any time, enterrs app_1 | [nodemon] watching dir(s): *.* app_1 | [nodemon] watching extensions: js,mjs,json app_1 | [nodemon] startingnode /app/server.js` app_1 | app is running on port 3000

    `

提交回复
热议问题