Objective: When computer startup service node js is automatically started.
- Forever: make process run continuously and automatically restart when it exits unexpectedly.
Implementation:
- Install forever in globally
npm install -g forever
- Create VbScript for executing project: I put it in root of project directory
Set WshShell = WScript.CreateObject("WScript.Shell") Return = WshShell.Run("cmd.exe /C forever start bin/www", 1, true)
- Startup folder
You can link VBscript file(shortcut) to startup folder
- Restart computer
No comments:
Post a Comment