Download NSSM and install it in a directory on the path.
Install npm_lazy and create a configuration file :-
npm install -g npm_lazy
npm_lazy --init > "%userprofile%/npm_lazy.config.js"
To create a Windows Service for npm_lazy :-
nssm install npm_lazy "%ProgramFiles%\nodejs\node.exe"
nssm set npm_lazy AppDirectory "%userprofile%\.npm_lazy"
nssm set npm_lazy AppParameters "%userprofile%\AppData\Roaming\npm\node_modules\npm_lazy\bin\npm_lazy --config %userprofile%\npm_lazy.config.js"
To point NPM at npm_lazy :-
npm config set registry http://localhost:8080/
To start the Service :-
nssm start npm_lazy
To restart the service :-
nssm restart npm_lazy
To stop the service :-
nssm stop npm_lazy
To remove the service :-
nssm remove npm_lazy confirm