cnpmjs.org
Private npm registry and web for Enterprise, base on MySQL and Simple Store Service
Last updated 3 years ago by fengmk2 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cnpmjs.org 
SYNC missed versions from official npm registry.

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

Dockerized cnpmjs.org Installation Guide

Cnpmjs.org shipped with a simple but pragmatic Docker Compose configuration.With the configuration, you can set up a MySQL backed cnpmjs.org instance by executing just one command on Docker installed environment.

Preparation

Dockerized cnpmjs.org control command

Make sure your current working directory is the root of this GitHub repository.

Run dockerized cnpmjs.org
 $docker-compose up

This command will build a Docker image using the current code of repository. Then set up a dockerized MySQL instance with data initialized. After Docker container running, you can access your cnpmjs.org web portal at http://127.0.0.1:7002 and npm register at http://127.0.0.1:7001.

Run cnpmjs.org in the backend

$docker-compose up -d

Rebuild cnpmjs.org Docker image

$docker-compose build

Remove current dockerized cnpmjs.org instance

The current configuration set 2 named Docker Volume for your persistent data. If you haven't change the repository directory name, them will be "cnpmjsorg_cnpm-files-volume" & "cnpmjsorg_cnpm-db-volume".

Be Careful, the following commands will remove them.

$docker-compose rm 
$docker volume rm cnpmjsorg_cnpm-files-volume
$docker volume rm cnpmjsorg_cnpm-db-volume

You can get more information about your data volumes using the below commands:

$docker volume ls  // list all of your Docker volume
$docker volume inspect cnpmjsorg_cnpm-files-volume
$docker volume inspect cnpmjsorg_cnpm-db-volume

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

Current Tags

  • 2.19.4                                ...           latest (3 years ago)
  • 1.7.6                                ...           latest-1 (5 years ago)
  • 2.19.4                                ...           latest-2 (3 years ago)
  • 3.0.0-rc.32                                ...           latest-3 (2 months ago)
  • 3.0.0-rc.32                                ...           next (2 months ago)
  • 1.7.6                                ...           v1 (5 years ago)

219 Versions

  • 3.0.0-rc.32                                ...           2 months ago
  • 3.0.0-rc.31                                ...           5 months ago
  • 3.0.0-rc.30                                ...           6 months ago
  • 3.0.0-rc.29                                ...           9 months ago
  • 3.0.0-rc.28                                ...           9 months ago
  • 3.0.0-rc.27                                ...           a year ago
  • 3.0.0-rc.26                                ...           a year ago
  • 3.0.0-rc.25                                ...           a year ago
  • 3.0.0-rc.24                                ...           a year ago
  • 3.0.0-rc.23                                ...           a year ago
  • 3.0.0-rc.22                                ...           a year ago
  • 3.0.0-rc.21                                ...           a year ago
  • 3.0.0-rc.20                                ...           a year ago
  • 3.0.0-rc.19                                ...           a year ago
  • 3.0.0-rc.18                                ...           a year ago
  • 3.0.0-rc.17                                ...           a year ago
  • 3.0.0-rc.16                                ...           a year ago
  • 3.0.0-rc.15                                ...           a year ago
  • 3.0.0-rc.14                                ...           a year ago
  • 3.0.0-rc.13                                ...           a year ago
  • 3.0.0-rc.12                                ...           a year ago
  • 3.0.0-rc.11                                ...           2 years ago
  • 3.0.0-rc.10                                ...           2 years ago
  • 3.0.0-rc.9                                ...           2 years ago
  • 3.0.0-rc.8                                ...           2 years ago
  • 3.0.0-rc.7                                ...           2 years ago
  • 3.0.0-rc.6                                ...           2 years ago
  • 3.0.0-rc.5                                ...           2 years ago
  • 3.0.0-rc.4                                ...           2 years ago
  • 3.0.0-rc.3                                ...           2 years ago
  • 3.0.0-rc.2                                ...           2 years ago
  • 3.0.0-rc.1                                ...           2 years ago
  • 3.0.0-beta.6                                ...           2 years ago
  • 3.0.0-beta.5                                ...           2 years ago
  • 3.0.0-beta.4                                ...           2 years ago
  • 3.0.0-beta.3                                ...           2 years ago
  • 3.0.0-beta.2                                ...           2 years ago
  • 3.0.0-beta.1                                ...           2 years ago
  • 3.0.0-alpha.16                                ...           3 years ago
  • 3.0.0-alpha.15                                ...           3 years ago
  • 3.0.0-alpha.14                                ...           3 years ago
  • 3.0.0-alpha.13                                ...           3 years ago
  • 3.0.0-alpha.12                                ...           3 years ago
  • 3.0.0-alpha.11                                ...           3 years ago
  • 3.0.0-alpha.10                                ...           3 years ago
  • 3.0.0-alpha.9                                ...           3 years ago
  • 3.0.0-alpha.8                                ...           3 years ago
  • 3.0.0-alpha.7                                ...           3 years ago
  • 3.0.0-alpha.6                                ...           3 years ago
  • 3.0.0-alpha.5                                ...           3 years ago
  • 3.0.0-alpha.4                                ...           3 years ago
  • 3.0.0-alpha.3                                ...           3 years ago
  • 3.0.0-alpha.2                                ...           3 years ago
  • 3.0.0-alpha.1                                ...           3 years ago
  • 2.19.4                                ...           3 years ago
  • 2.19.3                                ...           3 years ago
  • 2.19.2                                ...           3 years ago
  • 2.19.1                                ...           3 years ago
  • 2.19.0                                ...           3 years ago
  • 2.18.0                                ...           3 years ago
  • 2.17.2                                ...           4 years ago
  • 2.17.1                                ...           4 years ago
  • 2.17.0                                ...           4 years ago
  • 2.16.2                                ...           4 years ago
  • 2.16.1                                ...           4 years ago
  • 2.16.0                                ...           4 years ago
  • 2.15.0                                ...           4 years ago
  • 2.14.0                                ...           4 years ago
  • 2.13.0                                ...           4 years ago
  • 2.12.2                                ...           4 years ago
  • 2.12.1                                ...           4 years ago
  • 2.12.0                                ...           4 years ago
  • 2.11.0                                ...           4 years ago
  • 2.10.1                                ...           4 years ago
  • 2.10.0                                ...           4 years ago
  • 2.9.5                                ...           4 years ago
  • 2.9.4                                ...           4 years ago
  • 2.9.3                                ...           4 years ago
  • 2.9.2                                ...           4 years ago
  • 2.9.1                                ...           4 years ago
  • 2.9.0                                ...           4 years ago
  • 2.8.1                                ...           4 years ago
  • 2.8.0                                ...           4 years ago
  • 2.7.1                                ...           4 years ago
  • 2.7.0                                ...           4 years ago
  • 2.6.2                                ...           4 years ago
  • 2.6.1                                ...           4 years ago
  • 2.5.1                                ...           4 years ago
  • 2.5.0                                ...           5 years ago
  • 2.4.1                                ...           5 years ago
  • 2.4.0                                ...           5 years ago
  • 2.3.1                                ...           5 years ago
  • 2.3.0                                ...           5 years ago
  • 2.2.1                                ...           5 years ago
  • 2.2.0                                ...           5 years ago
  • 2.1.5                                ...           5 years ago
  • 2.1.4                                ...           5 years ago
  • 2.1.3                                ...           5 years ago
  • 2.1.2                                ...           5 years ago
  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 2.0.0-rc.15                                ...           5 years ago
  • 2.0.0-rc.14                                ...           5 years ago
  • 2.0.0-rc.13                                ...           5 years ago
  • 2.0.0-rc.12                                ...           5 years ago
  • 2.0.0-rc.11                                ...           5 years ago
  • 2.0.0-rc.10                                ...           5 years ago
  • 2.0.0-rc.9                                ...           5 years ago
  • 2.0.0-rc.8                                ...           5 years ago
  • 2.0.0-rc.7                                ...           5 years ago
  • 2.0.0-rc.6                                ...           5 years ago
  • 2.0.0-rc.5                                ...           5 years ago
  • 2.0.0-rc.4                                ...           5 years ago
  • 2.0.0-rc.3                                ...           5 years ago
  • 2.0.0-rc.2                                ...           5 years ago
  • 1.7.6                                ...           5 years ago
  • 2.0.0-rc.1                                ...           5 years ago
  • 2.0.0-beta5                                ...           5 years ago
  • 1.7.5                                ...           6 years ago
  • 1.7.4                                ...           6 years ago
  • 2.0.0-beta4                                ...           6 years ago
  • 2.0.0-beta3                                ...           6 years ago
  • 1.7.3                                ...           6 years ago
  • 2.0.0-beta2                                ...           6 years ago
  • 2.0.0-beta1                                ...           6 years ago
  • 2.0.0-beta0                                ...           6 years ago
  • 1.7.2                                ...           6 years ago
  • 1.7.1                                ...           6 years ago
  • 1.7.0                                ...           6 years ago
  • 1.6.1                                ...           6 years ago
  • 1.6.0                                ...           6 years ago
  • 1.5.5                                ...           6 years ago
  • 1.5.4                                ...           6 years ago
  • 1.5.3                                ...           6 years ago
  • 1.5.2                                ...           6 years ago
  • 1.5.1                                ...           6 years ago
  • 1.5.0                                ...           6 years ago
  • 1.4.4                                ...           6 years ago
  • 1.4.3                                ...           6 years ago
  • 1.4.2                                ...           6 years ago
  • 1.4.1                                ...           6 years ago
  • 1.4.0                                ...           6 years ago
  • 1.3.2                                ...           6 years ago
  • 1.3.0                                ...           6 years ago
  • 1.2.2                                ...           6 years ago
  • 1.2.1                                ...           6 years ago
  • 1.2.0                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.6                                ...           6 years ago
  • 1.0.5                                ...           6 years ago
  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.9.2                                ...           6 years ago
  • 0.9.1                                ...           6 years ago
  • 0.9.0                                ...           6 years ago
  • 0.8.7                                ...           6 years ago
  • 0.8.6                                ...           6 years ago
  • 0.8.5                                ...           6 years ago
  • 0.8.4                                ...           6 years ago
  • 0.8.3                                ...           6 years ago
  • 0.8.2                                ...           6 years ago
  • 0.8.1                                ...           6 years ago
  • 0.8.0                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.1                                ...           6 years ago
  • 0.6.0                                ...           6 years ago
  • 0.5.3                                ...           6 years ago
  • 0.5.2                                ...           6 years ago
  • 0.4.3                                ...           6 years ago
  • 0.4.1                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.12                                ...           6 years ago
  • 0.3.11                                ...           6 years ago
  • 0.3.10                                ...           6 years ago
  • 0.3.9                                ...           6 years ago
  • 0.3.8                                ...           6 years ago
  • 0.3.7                                ...           6 years ago
  • 0.3.6                                ...           6 years ago
  • 0.3.5                                ...           6 years ago
  • 0.3.4                                ...           6 years ago
  • 0.3.3                                ...           6 years ago
  • 0.3.2                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.27                                ...           6 years ago
  • 0.2.26                                ...           6 years ago
  • 0.2.25                                ...           6 years ago
  • 0.2.24                                ...           6 years ago
  • 0.2.23                                ...           6 years ago
  • 0.2.22                                ...           6 years ago
  • 0.2.21                                ...           6 years ago
  • 0.2.20                                ...           6 years ago
  • 0.2.19                                ...           6 years ago
  • 0.2.18                                ...           6 years ago
  • 0.2.17                                ...           6 years ago
  • 0.2.16                                ...           6 years ago
  • 0.2.15                                ...           6 years ago
  • 0.2.14                                ...           6 years ago
  • 0.2.13                                ...           6 years ago
  • 0.2.12                                ...           6 years ago
  • 0.2.11                                ...           6 years ago
  • 0.2.10                                ...           6 years ago
  • 0.2.9                                ...           6 years ago
  • 0.2.8                                ...           6 years ago
  • 0.2.7                                ...           6 years ago
  • 0.2.6                                ...           6 years ago
  • 0.2.5                                ...           6 years ago
  • 0.2.4                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 4
Last Month 12
Dependencies (45)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |