I have installed nodemon using command:
npm install nodemon -g
Having done that I changed "start": "node ./bin/www"
to "start": "nodemon ./bin/www"
Output in Console on running npm start
:
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www ./bin/www`
and so on....
Where am I going wrong? Please bear in mind that this is my 3rd day on nodejs so keep it simple.
Edit
"scripts": {
"start": "nodemon app.js"
},
"nodemon app.js" seems to work since the console does not show any errors but then I am unable to run the application. However if I change it back to node ./bin/www
it would work.