Download NSSM and install it in a directory on the path.
Install npm_lazy :-
npm install -g verdaccio
Create a configuration file :-
cd "%userprofile%\AppData\Roaming\npm\node_modules\verdaccio"
copy conf\default.yaml config.yaml
To create a Windows Service for npm_lazy :-
nssm install verdaccio "%ProgramFiles%\nodejs\node.exe"
nssm set verdaccio AppDirectory "%userprofile%\AppData\Roaming\verdaccio"
nssm set verdaccio AppParameters "%userprofile%\AppData\Roaming\npm\node_modules\verdaccio\build\lib\cli.js -c %userprofile%\AppData\Roaming\verdaccio\config.yaml"
To point NPM at npm_lazy :-
npm config set registry http://localhost:4873/
To start the Service :-
nssm start verdaccio
To restart the service :-
nssm restart verdaccio
To stop the service :-
nssm stop verdaccio
To remove the service :-
nssm remove verdaccio confirm
Adding npm_lazy npm cache as an uplink :-
config.yaml
uplinks:
npm_lazy:
url: http://localhost:8080