local npm registry w/ real registry fallback
- Install packages from a local dir.
- Fallback to real registry for foreign modules and everything else.
$ npm install npm-server -g
Usage: npm-server [options] [dir]
Options:
-h, --help output usage information
-V, --version output the version number
-H, --host <value> server host [localhost]
-p, --port <value> server port [6070]
-e, --expire <sec> cache expire time [60]
Run the registry server:
$ npm-server
Then install packages, instructing npm to use our registry:
$ npm --registry=http://localhost:6070/ install colors
Or, you can also use it permanently:
$ npm set registry http://localhost:6070/
This project is a DEVELOPMENT tool. It does not aim to be 100% compliant with the npm registry. The only command implemented is install
. The rest of npm commands like publish
, adduser
, owner
etc. will be forwarded to the REAL npm registry, so use with caution. You've been warned.
MIT