node.js http server as a Windows service

后端 未结 6 763
再見小時候
再見小時候 2021-02-01 21:42

I created a simple http server in Node.js.

I wanted to make it run permanently on my Windows 2008 machine, so that, if the computer reboots, it automatically restarts.

6条回答
  •  孤街浪徒
    2021-02-01 22:12

    In the past, I've used NSSM for running Node.js applications as services on Windows. It works quite well, and can be configured to automatically restart your application in the event of a crash.

    http://nssm.cc/usage

    nssm install YourService "C:\Program Files\Node.js\node.exe" "C:\something\something.js"
    

提交回复
热议问题