DEV Community

Installing a node.js application as a Windows service

Peter Eysermans on April 12, 2020

It wasn't my intention when I started the first article but this has become a series of how to run node applications in production with IIS on Wind...
Collapse
 
denisehilton profile image
Denise Hilton

I believe the easiest way to run a nodejs app as a Windows service is by using nssm to create the service. Just a couple of commands and you're done. Here's a short version of the guide.

Collapse
 
petereysermans profile image
Peter Eysermans

I agree, I have used NSSM in the past and it's also very useful. Thanks for the guide!

Collapse
 
karthikeyan_p_d02ee2fba80 profile image
Karthikeyan P

After a long day of fiddling with pm2 to install as a service to autostart a selenium automation web server without user logging into windows, this was the solution to the endless trouble faced.

pm2 when installed as a service causes issues with chrome-selenium not able to find the temp data dir or chromedriver as it runs under LOCAL SYSTEM windows user account.