Node.js: How to create paid node modules?

末鹿安然 提交于 2020-01-03 05:58:06

问题


How to sell node modules?

I need to publish my CMS plugins to NPM and allow users to install them, so some of them could be paid.

How do i do it?


回答1:


Contrary to some of the answers here, not everything on npm is open-source or publicly available to anyone - npm supports organizations, scoped packages, private modules and private scoped packages with restricted access. Even if it didn't, you can still host a private npm registry (see below) or host a module on GitHub or GitLab or any other git server, where you also can have private repositories with restricted access granted to your customers.

You can create a private npm module:

  • https://docs.npmjs.com/private-modules/intro

You can add access to such modules to your customers:

If you want to give access to someone, they need to be subscribed to private modules as well. Once they are, you can give them read or read-write access.

You can control access to the package on the access page. To get to the page, click on the Collaborators link or the plus button.

Or you can host your own private npm registry:

  • http://thejackalofjavascript.com/maintaining-a-private-npm-registry/

And you can host your modules on GitHub or GitLab or any other git server instead of npm.



来源:https://stackoverflow.com/questions/42931691/node-js-how-to-create-paid-node-modules

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