NPM Lazy

It’s a nice app for us to cache npm packages:

https://github.com/mixu/npm_lazy

Run Server

npm install -g npm_lazy # Install
npm_lazy --init > ~/npm_lazy.config.js # and then modify log file, cache dir, host, port.
setsid npm_lazy --config ~/npm_lazy.config.js & # Start!

Usage

To permanently set the registry via command line:

npm config set registry http://balin:4571/

To permanently set the registry via config file, in ~/.npmrc:

registry = http://balin:4571/

And then run:

npm install

Logs:

app debug cache get https://registry.npmjs.org/negotiator/-/negotiator-0.3.0.tgz
app debug [GET] https://registry.npmjs.org/negotiator
app debug cache get https://registry.npmjs.org/multiparty/-/multiparty-2.2.0.tgz
app debug [GET] https://registry.npmjs.org/multiparty
app debug cache get https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz
app debug [GET] https://registry.npmjs.org/minimist
app debug cache get https://registry.npmjs.org/adm-zip/-/adm-zip-0.2.1.tgz
app debug [GET] https://registry.npmjs.org/adm-zip