Nodejs debugging efficiency with supervisor plug-in

Source: Internet
Author: User

The installation of the supervisor is also simple:

Install directly with NPM you can type the command: Npm-g Install Supervisor

Note here that supervisor must be installed to the global, if you do not install to the global, the error command will prompt you to install to the global.

If you do not want to install to the default global, you can modify the global path to the current path yourself

NPM config set prefix "path"

After installation, you can use supervisor to start the service.

Supervisor App.js

The boot is exactly like this.

Modify, and then refresh

Memory will be accessed directly in the future to avoid repeated loading

This design of node. JS, while improving performance, is not conducive to the development of debugging,

Because we always want to see the effect as soon as we develop it, instead of terminating the process and restarting it every time.

Supervisor can help you implement this feature, it will monitor your code changes, and automatically restart node. js

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.