Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

Nodemon isn't restarting my server. Why?

I've gotten spoiled using Nodemon and while I've got that installed on the app that I'm working on (I didn't build it, I'm just working on it), it doesn't restart the server in the way I'm accustomed to and I don't know why.

Here's the way things look on my Command Line:

b.gust@AHA-DT-BGUST2 MINGW64 /c/wamp64/www/bsmart (BRUCE-code-cleanup)
$ npm start

> cams@1.0.0 start C:\wamp64\www\bsmart
> nodemon index.js

[nodemon] 2.0.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
Listening on PORT: 3000

Open in new window


...and here are my scripts:

{
  "name": "cams",
  "version": "1.0.0",
  "description": "Client Acquisition Management System",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
	"start": "nodemon index.js"
  },
  "author": "Mitch Cannon",
  "dependencies": {
    "aws-sdk": "^2.382.0",
    "bcrypt": "^3.0.2",
    "body-parser": "^1.18.3",
    "connect-mongo": "^2.0.3",
    "csv-stream": "^0.2.0",
    "dotenv": "^6.2.0",
    "express": "^4.16.4",
    "express-fileupload": "^1.0.0",
    "express-session": "^1.15.6",
    "express-sessions": "^1.0.6",
    "js-md5": "^0.7.3",
    "jsonwebtoken": "^8.4.0",
    "lodash": "^4.17.10",
    "moment": "^2.23.0",
    "moment-timezone": "^0.5.23",
    "mongodb": "^3.1.10",
    "mongoose": "^5.4.0",
    "multer-s3": "^2.9.0",
    "node-utils": "",
    "nodemailer": "^6.2.1",
    "nodemon": "^2.0.2",
    "papaparse": "^4.6.2",
    "request": "^2.88.0",
    "socket.io": "^2.2.0",
    "twig": "^1.12.0",
    "unzipper": "^0.9.11",
    "uuid": "^3.3.2",
    "validator": "^10.10.0"
  }
}

Open in new window


What am I missing that would allow for Nodemon to operate in the way I'm accustomed, as far as me making a change in the code and the server automatically restarting?
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

Thanks, David!
You're welcome!

Note: inotifywait is your friend. :-)