Forever Start Nodejs

Source: Internet
Author: User


Forever can be seen as a Nodejs daemon that can start, stop, and restart our app.

1. Global Installation Forever
sudo npm install forever-g 
2. Start
//1. Simple Start-upForever Start App.js//2. Specify forever information output file, of course, it will be put to ~/.forever/forever.logForever Start-l Forever.log app.js//3. Specify the log information and error log output files in the app.js.//- o is the Console.log output information,-e is the Console.error output informationForever Start-o Out.log-e err.log app.js//4. Append the log, forever default is not to overwrite the last boot log,//so if the second boot does not add-a, it will not let the runForever Start-l Forever.log-a app.js//5. Listen for all file changes under the current folderForever Start-w App.js
3. File change monitoring and automatic restart
//
4. Show all running services
5. Stop operation
////////
6. Restart operation

The restart operation is consistent with the stop operation.

  Forever Restartall

Forever Start Nodejs

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.