Offline private NPM repository

こ雲淡風輕ζ 提交于 2019-12-06 04:43:14

问题


I read about building private NPM mirrors/repositories, but didn't quite understand.

My goal is to make a repository that currently up to date, that contains all NPM packages available at the NPM website (The free packages) that I need. After downloading all packages I need to move it to a private network which is not connected to the internet. And set up a repository that will accept NPM requests in that private network.

every month I will update the packages I have outside the private network, and enter it to our private network again.

I never done anything like this before, Can anyone like guide me through it or Does anyone has a reading source that will explain step by step?

Good day !


回答1:


This appears to be one way of doing what you want:

https://web.archive.org/web/20160310020204/https://www.clock.co.uk/blog/how-to-create-a-private-npmjs-repository

(I've updated the link to a Wayback machine link since it was taken offline by original host.)

UPDATE: There seem to be a few ways to do this now.

For example:

  1. https://codebox.sh/ - free private npm registry
  2. http://blog.runkit.com/2016/09/13/tonic-is-now-runkit-a-part-of-stripe.html: "We started by buidling module-fs, a virtual filesystem capable of representing the entire state of npm at any particular microsecond. With module-fs we could make every version of the over 300,000 packages on npm available instantly. With truly immediate and frictionless access to any package, you could begin to think of npm as the global standard library, as essential to development tomorrow as built-in libraries are today."


来源:https://stackoverflow.com/questions/33450120/offline-private-npm-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!