Set up the express ready to write the project, but found that any change JS to use NPM start restart to take effect, this is not good, search for the discovery has such a module supervisor. then install it.
1. Install, this must be a global installation then let's start.
Npm-g Install Supervisor
2. Get to the project directory and execute it.
Supervisor App.js
Execution, strange how can not start, checked the information found that the new version of the entry file is Bin/www, you can look at the Package.json.
{ "name": "TestApp", "version": "0.0.0", " private": True, "scripts": { "start": "Node./bin/www" }, "dependencies": { "Body-parser": "~1.15.1", " cookie-parser": "~1.4.3", "Debug": "~2.2.0", " Express": "~4.13.4", "Jade": "~1.11.0", "Morgan": "~1.7.0", "Serve-favicon": "~2.3.0" } }
Then start the portal file.
Supervisor./bin/www
OK, Fix it. Let's get here today. There's a whole lot of work to do on your hands.
Nodejs Study (iii)-Install NODEJS supervisor, improve point efficiency.