【发布时间】:2018-06-18 18:57:23
【问题描述】:
我有一个网络应用程序。我想使用 nodemon 。要启动我的应用程序需要运行 'node ./bin/www',但 nodemon 默认运行另一个文件。而且我的网络应用程序不可用。
当我输入 cmd 时
nodemon
我明白了:
[nodemon] 1.14.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
但我想将默认启动文件从 node app.js 更改为 node ./bin/www
我该怎么做?
package.json
{
"name": "loc8r",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.18.2",
"cookie-parser": "~1.4.3",
"debug": "~2.6.9",
"express": "~4.15.5",
"jade": "~1.11.0",
"mongoose": "4.13.9",
"morgan": "~1.9.0",
"nodemon": "^1.14.9",
"readline": "1.3.0",
"request": "^2.83.0",
"serve-favicon": "~2.4.5"
},
"main": "app.js",
"devDependencies": {},
"author": "",
"license": "ISC",
"description": ""
}
【问题讨论】:
标签: nodemon