Skip to content

HunanTV/cnpmjs.org

Repository files navigation

cnpmjs.org

Thanks cnpmjs.org

本项目基于 https://github.com/cnpm/cnpmjs.org, 由于本人忘了忽略 配置文件,导致多个commit中包含了数据库账户信息,不知道如何处理 因此删除了所有历史commits。于此对该项目开发者表示抱歉。

经过修改后的功能包括:

  1. 所有注册者皆可publish 和下载包。 没有scope限制, 当内网和公网项目重名时,内网包会覆盖公网包。

  2. 不做任何包同步

  3. 增加了一些页面展示。

  4. config/index.js 里面需要修改字段接有注释

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

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

Releases

No releases published

Packages

No packages published