Description
Private npm registry and web for Enterprise, base on koa, MySQL and Simple Store Service.
Our goal is to provide a low cost maintenance, easy to use, and easy to scale solution for private npm.
What can you do with cnpmjs.org?
- Build a private npm for your own enterprise. (alibaba is using
cnpmjs.orgnow) - Build a npm mirror. (we use it to build a mirror in China: https://npmmirror.com/)
- Use the private npm service provided by Alibaba Cloud DevOps which build with cnpm. https://packages.aliyun.com/
Features
- Support "scoped" packages: npm/npm#5239
- Support CORS
- Simple to deploy: only need
mysqland a simple store system. - Low cost and easy maintenance:
package.jsoninfo can store in MySQL, MariaDB, SQLite or PostgreSQL. tarball(tgz file) can store in Amazon S3 or other object storage service. - Automatic synchronization: automatically sync from any registry specified. support two sync modes:
- Sync all modules from upstream
- Only sync the modules after first access.
- Manual synchronization: automatic synchronization may has little delay. you can sync manually on web page.
- Customized client: we provide a client cnpm to extend
npmwith more features(synccommand, gzip support). And it is easy to wrap for your own registry which build withcnpmjs.org. - Compatible with npm client: you can use the official npm client with
cnpmjs.org. you only need to change the registry in client config. - Support http_proxy: if you're behind a firewall, you can provide a http proxy for cnpmjs.org.
Docs
- How to deploy
- cnpm client: cnpm,
npm install -g cnpm - Sync packages through
http_proxy - Migrating from 1.x to 2.x
- New features in 2.x.
- wiki
Develop on your local machine
Dependencies
- node >= 8.0.0
- Databases: only required one type
Clone code and run test
# clone from git
$ git clone https://github.com/cnpm/cnpmjs.org.git
# install dependencies
$ make install
# test
$ make test
# coverage
$ make test-cov
# update dependencies
$ make autod
# start server with development mode
$ make devfrom https://github.com/cnpm/cnpmjs.org
No comments:
Post a Comment