【发布时间】:2020-11-27 14:03:40
【问题描述】:
当我运行 nodemon 时,它显示
[nodemon] 1.17.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
但是当我运行 npm start 时,一切正常。为什么 nodemon 不工作
我的 package.json
{
"name": "sarthakmedia",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "^1.18.3",
"cookie-parser": "~1.4.3",
"cors": "^2.8.4",
"debug": "~2.6.9",
"express": "~4.16.0",
"express-mysql-session": "^1.3.0",
"express-session": "^1.15.6",
"git": "^0.1.5",
"http-errors": "~1.6.2",
"jade": "~1.11.0",
"morgan": "~1.9.0",
"mysql": "*",
"nodemon": "^1.17.4",
"pug": "2.0.0-beta11"
},
"description": "practise",
"main": "app.js",
"devDependencies": {},
"author": "Anita",
"license": "ISC"
}
API 根本不会被调用。 nodemon 启动正常
【问题讨论】:
-
在我看来 nodemon 工作正常。什么不工作?您可以在本地访问您的应用程序吗?还是不行?
-
当我进行 api 调用时,它不会发送任何请求。使用 npm start 时请求在哪里工作正常
-
你能分享你的 package.json 内容吗?或者至少是你的 npm 启动规则?
-
为什么是
标签? (您可能是指 吗?)
标签: sql node.js express nodemon