我刚刚开始进入node.js,通过一些教程.我只是尝试节点主管,但在运行时遇到一些麻烦.我正在使用express来设置应用程序,然后安装supervisor包.
使用以下命令启动App:
npm start
Run Code Online (Sandbox Code Playgroud)
正如我所期望的那样,一切都像以前做过几次一样有效.
但是,如果我启动supervisor(node_module\.bin\supervisor app.js),我会收到以下消息:
Starting child process with 'node app.js'
Program node app.js exited with code 0
Run Code Online (Sandbox Code Playgroud)
我到处寻找答案,但我很难过.我可能做了一些蠢事,有人可以帮忙吗?
提前致谢
这是我当前的package.json文件:
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node ./bin/www",
},
"dependencies": {
"express": "~4.0.0",
"static-favicon": "~1.0.0",
"morgan": "~1.0.0",
"cookie-parser": "~1.0.1",
"body-parser": "~1.0.0",
"debug": "~0.7.4",
"jade": "~1.3.0",
"less-middleware": "0.1.15",
"supervisor": "*"
}
}
Run Code Online (Sandbox Code Playgroud)