Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing npm_lazy as a Windows Service #86

Open
AaronNGray opened this issue Oct 4, 2019 · 2 comments
Open

Installing npm_lazy as a Windows Service #86

AaronNGray opened this issue Oct 4, 2019 · 2 comments

Comments

@AaronNGray
Copy link

AaronNGray commented Oct 4, 2019

I have been using Verdaccio https://verdaccio.org/ installed as a Windows Service. I am wondering if the same can be done for npm_lazy. I cannot find any instruction for doing this, so will experiment and report back, and mabe do a documentation pull request if I get something working properly.

@AaronNGray
Copy link
Author

AaronNGray commented Oct 5, 2019

How to install npm_lazy as a Windows Service from the command line.

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

@AaronNGray
Copy link
Author

Can someone verify this all works correctly then it may be added to the npm_lazy documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant