Private npm registry and web for Enterprise
JavaScript CSS HTML Other
Latest commit 0d86d05 Jan 5, 2017 @fengmk2 fengmk2 Release 2.19.2
Permalink
Failed to load latest commit information.
bin feat: add change password script (#1070) Nov 17, 2016
common fix: logger seperator should be one EOL (#972) Jun 26, 2016
config fix: try to sync from official replicate (#1076) Nov 19, 2016
controllers fix: should auto sync un-deprecate message (#1105) Jan 5, 2017
docs fix: try to use the best repository url (#1102) Dec 28, 2016
lib fix: try to use config.registryHost first on setDownloadURL (#1044) Sep 27, 2016
middleware refactor: refine publishable's code (#1022) Aug 22, 2016
models deps: sequelize@3.19.0 Feb 2, 2016
public feat: add security check badge for public package (#971) Jun 26, 2016
routes fix: support downloads total on scope package (#1088) Dec 5, 2016
servers feat: enable maxrequests middleware (#1003) Jul 26, 2016
services fix: should auto sync un-deprecate message (#1105) Jan 5, 2017
sync fix: try to sync from official replicate (#1076) Nov 19, 2016
test fix: should auto sync un-deprecate message (#1105) Jan 5, 2017
tools fix: try to sync from official replicate (#1076) Nov 19, 2016
view/web feat: add security check badge for public package (#971) Jun 26, 2016
.editorconfig update editorconfig Nov 25, 2014
.gitignore change proxy/user.js => models/user.js Oct 12, 2014
.jshintignore feat: list packages by username Sep 28, 2015
.jshintrc mv proxy/module.js into services/package.js Oct 15, 2014
.node-dev.json feat(mock): use koa-mock for front end dev Nov 21, 2014
.npmignore docs: Deploy a private npm registry in 5 minutes Feb 3, 2015
.travis.yml test: add node v7 Nov 15, 2016
AUTHORS Release 2.19.0 Dec 20, 2016
CONTRIBUTING.md add contribute guidelines Apr 9, 2014
History.md Release 2.19.2 Jan 5, 2017
LICENSE.txt fix: should sync missing public scoped package on install (#946) Jun 5, 2016
Makefile feat: enable maxrequests middleware (#1003) Jul 26, 2016
README.md feat: add security check badge for public package (#971) Jun 26, 2016
dispatch.js feat: add changes stream syncer (#970) Jun 25, 2016
index.js feat: list packages by username Sep 28, 2015
logo.png add module controller test cases; fix next module not exists logic bug. Dec 5, 2013
package.json Release 2.19.2 Jan 5, 2017
worker.js feat: enable maxrequests middleware (#1003) Jul 26, 2016

README.md

cnpmjs.org

NPM version build status Test coverage David deps Known Vulnerabilities npm download

logo

What is this?

Private npm registry and web for Enterprise, base on koa, MySQL and Simple Store Service.

Our goal is to provide a low cost maintenance and easy to use solution for private npm.

What can you do with cnpmjs.org

  • Build a private npm for your own enterprise. (alibaba is using cnpmjs.org now)
  • Build a mirror NPM. (we use it to build a mirror in China: cnpmjs.org)
  • Build a completely independent NPM registry to store whatever you like.

Features

  • Support "scoped" packages: npm/npm#5239
  • Support CORS
  • Simple to deploy: only need mysql and a simple store system. You can get the source code through npm or git.
  • Low cost and easy maintenance: package.json info store in MySQL, MariaDB, SQLite or PostgreSQL databases, tarball(tgz file) store in CDN or other store systems.
  • Automatic synchronization: automatic synchronization from any registry specified, support two sync modes:
    • Sync all modules from a specified registry, like npm registry.
    • Only sync the modules that exists in your own registry.
  • Manual synchronization: automatic synchronization may has little delay, but you can syn immediately by manually.
  • Customized client: we provide a client cnpm to extend npm with more features(sync command, gzip support). And it easy to wrap for your own registry which build with cnpmjs.org.
  • Compatible with NPM client: you can use the origin NPM client with cnpmjs.org, only need to change the registry in config. Even include manual synchronization (through install command).
  • Version badge: base on shields.io cnpm-badge
  • Support http_proxy: if you're behind firewall, need to request through http proxy

PROTIP Be sure to read Migrating from 1.x to 2.x as well as New features in 2.x.

Getting Start

Develop on your local machine

Dependencies

  • node >= 4.3.1
  • Databases: only required one type
    • sqlite3 >= 3.0.2, we use sqlite3 by default
    • MySQL >= 0.5.0, include mysqld and mysql cli. I test on mysql@5.6.16.
    • MariaDB
    • PostgreSQL

Clone codes 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 dev

How to contribute

  • Clone the project
  • Checkout a new branch
  • Add new features or fix bugs in the new branch
  • Make a pull request and we will review it ASAP

Tips: make sure your code is following the node-style-guide.

Sponsors

  • 阿里云 (2016.2 - now)
  • UCloud云计算 (2015.3 - 2016.3)

License

MIT