What you did is correct (i.e. updating the path in bin \ www).
However, you must start your express application using npm start
In general, npm applications allow you to specify a command inside the json package that will launch your application, and this is the first thing to watch.
For a pronounced generated image, this should look like this:
{
"scripts" : {
"start" : "node bin/www"
}
}
If you want to change it and pass arguments, then all you need to do is update the package.json file and your end users will not be affected.
npm startprovides users of your program with a consistent way to launch the application no matter what file names or parameters you change
development setting
, nodemon , :
nodemon bin/www
script :
{
"scripts" : {
"start" : "node bin/www",
"devel" : "nodemon bin/www"
}
}
nodemon :
npm run devel
, nodemon.