我正在运行我的 nodejs 应用程序npm start
我刚刚安装了nodemon,
sudo npm install -g nodemon
以便在保存对文件的更改时可以重新启动服务器。
但是当我尝试启动服务器时,像这样
nodemon ./app.js localhost 3000 or nodemon start localhost 3000
我把它作为输出
LM-SJC-00871929:webapp gdeep$ nodemon ./app.js localhost 3000
28 May 23:34:30 - [nodemon] v1.1.1
28 May 23:34:30 - [nodemon] to restart at any time, enter `rs`
28 May 23:34:30 - [nodemon] watching: *.*
28 May 23:34:30 - [nodemon] starting `node ./app.js localhost 3000`
但是当我访问我的网页时,我得到了
Oops! Google Chrome could not connect to localhost:3000
. 我究竟做错了什么?
App.js 在这里http://collabedit.com/t35dy