本文最后更新于:2014-04-01 13:42:59
原文:http://www.yaosansi.com/post/npm-mirror/

##What is an npm mirror?
A mirror is simply a read-only copy of the main npm registry. A mirror lets you install any module that exists in npm. The only thing you can’t do is publish updates or new modules.

##How do I use an npm mirror?
The npm command line tool makes it very easy to use a mirror. There are two ways.

###Specify the registry when installing:

1
$ npm install --registry http://registry.npmjs.org

Update the registry permanently in the config:

1
$ npm config set registry http://registry.npmjs.org

Main npm Registry

Registry: http://registry.npmjs.org
Website: npmjs.org
Region: Global
Data Center: Joyent, Fastly
Maintainer: npm Inc.
Established: 2010


European npm Mirror

Registry: http://registry.npmjs.eu
Website: npmjs.eu
Region: Europe, Germany
Data Center: Hetzner
Maintainer: Maciej Małecki
Established: November, 2013


Australian npm Mirror

Registry: http://registry.npmjs.org.au
Website: npm.nodejs.org.au
Region: Australia
Data Center: AWS
Maintainer: Rod Vagg
Established: July, 2013


Nodejitsu US npm Mirror

Registry: https://registry.nodejitsu.com
Website: nodejitsu.com
Region: US East
Data Center: Joyent
Maintainer: Nodejitsu
Established: January, 2014


StrongLoop US npm Mirror

Registry: https://npm.strongloop.com
Website: strongloop.com
Region: US West
Data Center: Rackspace
Maintainer: StrongLoop
Established: February, 2014


China npm mirror

Registry: http://registry.cnpmjs.org
Website: http://www.cnpmjs.org/
Region: China