问题
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