您可以为组织托管私有存储库以与npm一起使用吗? [英] can you host a private repository for your organization to use with npm?

查看:65
本文介绍了您可以为组织托管私有存储库以与npm一起使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Npm听起来像是在组织内使用的绝佳平台,对是否可以进行私人回购(例如Nexus/Maven)感到好奇.在Google上什么都没有:(

Npm sounds like a great platform to use within an organization, curious if a private repo is possible, like with Nexus/Maven. Nothing comes up on Google :(

推荐答案

我认为没有简单的方法可以做到这一点.

I don't think there is an easy way to do this.

查看npm文档告诉我们,有可能:

我可以运行自己的私人注册表吗?

是的!

Can I run my own private registry?

Yes!

最简单的方法是复制沙发数据库,​​并使用相同(或相似)的设计文档来实现API.

The easiest way is to replicate the couch database, and use the same (or similar) design doc to implement the APIs.

如果您从官方CouchDB设置了连续复制,然后将内部CouchDB设置为注册表配置,那么您将能够读取除私有包之外的所有已发布包,并且默认情况下仅会发布内部.然后,如果您想发布一个程序包供全世界查看,则可以简单地覆盖该命令的--registry配置.

If you set up continuous replication from the official CouchDB, and then set your internal CouchDB as the registry config, then you'll be able to read any published packages, in addition to your private ones, and by default will only publish internally. If you then want to publish a package for the whole world to see, you can simply override the --registry config for that command.

编辑(2017-02-26):

并不是很新,但是现在有付费计划在NPM上托管私有软件包.

Not really new, but there are now paid plans to host private packages on NPM.

多年来,通过基于NPM构建的巨大前端生态系统,NPM也已成为许多非Node.js公司的一个因素.如果您的公司已经在内部运行 Sonatype Nexus 来内部托管Java项目,则也可以使用它用于托管内部NPM软件包.

Over the years, NPM has become a factor for many non-Node.js companies, too, through the huge frontend ecosystem that's built upon NPM. If your company is already running Sonatype Nexus for hosting Java projects internally, you can also use it for hosting internal NPM packages.

其他选项包括 JFrog Artifactory

Other options include JFrog Artifactory and Inedo ProGet, but I haven't used those.

这篇关于您可以为组织托管私有存储库以与npm一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆