Nodejs Study (iii)-Install NODEJS supervisor, improve point efficiency.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.