Using npm in Europe
You may not know, but there's a European mirror (based in Germany) for the npm registry.
If you're in Europe, you'll find this mirror significantly faster (and seems to be more reliable).
To force the use of the European mirror simply append the --registry http://registry.npmjs.eu flag to the end of your command.
You could also setup an alias for convenience
$ alias enpm="npm --registry http://registry.npmjs.eu"
then usage is a simple as:
$ enpm install functional.js
I've gone into more detail (including how much faster this actually is) in my blog post.
Written by Lee Crossley
Related protips
2 Responses
you can just do "npm config set registry http://registry.npmjs.eu" and it creates a .npmrc file with this setting, no need to add an alias
Thanks @filipebarros, good tip. I personally alias so I can PUT registry.npmjs.org when publishing.
Have a fresh tip? Share with Coderwall community!
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside