简体   繁体   中英

How to install a private Node.js package repository for a company intranet?

What is the recommended way of distributing packages to Node.js servers, running inside a company intranet? The problem is most servers cannot directly access the npm registry . Is it possible to install a private repo, sync it with the official one, and then sync the internal servers from here?

Best practice is to check your node_modules into your git repository (remove node_modules from .gitignore). Then, only your developer machines will need access to npm.org, and the servers will get the packages from your internal git repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM