Nodejs Server Restart

Source: Internet
Author: User

When we develop the node application, but your application has been started, this time if you modify the server file, then if the change works, you have to manually stop the service and then restart, which is undoubtedly a very annoying thing in the development process, it is best to have a can monitor all the changes in the file of the script , a single discovery file changes immediately restart the service and reload the file that you just modified. Recommended here: Nodemon.

First, in order to be globally available for this command, it is best to install it globally:
NPM install-g Nodemon

Then go to your project root directory: Nodemon server.js

this launches the app and automatically restarts the service after the file has changed.

Nodejs Server Restart

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.