• This repository has been archived on 02/Jun/2024
  • Stars
    star
    3,551
  • Rank 12,494 (Top 0.3 %)
  • Language
    JavaScript
  • License
    Other
  • Created almost 11 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

‼️ ‼️ ‼️ ‼️ DEPRECATED, please use https://github.com/cnpm/cnpmcore ‼️ ‼️ ‼️ ‼️

‼️ ‼️ ‼️ ‼️ DEPRECATED, please use https://github.com/cnpm/cnpmcore instead ‼️ ‼️ ‼️ ‼️

‼️ ‼️ ‼️ ‼️ DEPRECATED, please use https://github.com/cnpm/cnpmcore instead ‼️ ‼️ ‼️ ‼️

‼️ ‼️ ‼️ ‼️ DEPRECATED, please use https://github.com/cnpm/cnpmcore instead ‼️ ‼️ ‼️ ‼️


cnpmjs.org

npm version Node.js CI Test coverage Known Vulnerabilities npm download FOSSA Status

logo

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?

Features

  • Support "scoped" packages: npm/npm#5239
  • Support CORS
  • Simple to deploy: only need mysql and a simple store system.
  • Low cost and easy maintenance: package.json info 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 npm with more features(sync command, gzip support). And it is easy to wrap for your own registry which build with cnpmjs.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

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 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 backend 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)

License

MIT

Contributors


fengmk2


dead-horse


greenkeeperio-bot


ibigbug


killagu


alsotang


XadillaX


JacksonTian


Solais


4simple


21paradox


Zian502


albertZhang2013


ankurk91


huangbowen521


gwenaelp


KidkArolis


tq0fqeu


limianwang


LoicMahieu


paulvi


XXBeii


jpuncle


vincentmrlau


stoneChen


dickeylth


fossabot


gniavaj


hellojukay


liyangready

This project follows the git-contributor spec, auto updated at Sun Mar 20 2022 09:50:54 GMT+0800.

FOSSA Status

More Repositories

1

cnpm

cnpm: npm client for China mirror of npm
JavaScript
2,016
star
2

cnpmcore

Private NPM Registry for Enterprise
TypeScript
608
star
3

npminstall

Make `npm install` fast and easy.
JavaScript
497
star
4

koa-middlewares

easy way to use some useful koa middlewares
JavaScript
177
star
5

binary-mirror-config

Binary mirror config for prebuild and node-pre-gyp
JavaScript
162
star
6

cnpmweb

Web for cnpmcore
TypeScript
90
star
7

bug-versions

collect all bug versions on npm package.
JavaScript
83
star
8

nodeinstall

Another node installer that bundle node with application.
JavaScript
83
star
9

mirrors

‼️ ‼️ ‼️ ‼️ DEPRECATED, please use https://github.com/cnpm/cnpmcore ‼️ ‼️ ‼️ ‼️
JavaScript
73
star
10

rapid

The fastest way to install npm packages.
Rust
38
star
11

koa-limit

koa middleware for limiting requests by ip
JavaScript
31
star
12

unpkg-white-list

npmmirror.com 允许开启 unpkg 功能的白名单列表,避免被当作网盘滥用
JavaScript
30
star
13

web.cnpmjs.org

Web app of registry.cnpmjs.org
JavaScript
14
star
14

oss-cnpm

oss wraper for https://cnpmjs.org
JavaScript
11
star
15

upyun-storage

Upyun wrapper for cnpm
JavaScript
9
star
16

sfs

Simple file store
JavaScript
7
star
17

rapid.app

The desktop app for rapid npm installation.
JavaScript
5
star
18

fs-cnpm

fs storage wrapper for cnpm
JavaScript
4
star
19

errors

cnpm errors
TypeScript
4
star
20

safe-publish-tag

Get the safe publish tag when you `npm publish`
JavaScript
3
star
21

npminstall-ci

CI Tests for [npminstall](https://npmjs.com/npminstall)
Shell
2
star
22

r.cnpmjs.org

r.cnpmjs.org base on cnpmcore
TypeScript
2
star
23

tfs-cnpm

a tfs api wraper for cnpm
JavaScript
1
star
24

upyun-cnpm

co-upyun-storage for cnpm
JavaScript
1
star
25

npminstall-benchmark

npminstall vs npm vs pnpm vs yarn
Makefile
1
star
26

co-upyun-storage

Upyun-storage for co
JavaScript
1
star
27

cos-cnpm

tencent-cloud cos wrapper for cnpm
JavaScript
1
star
28

qn-cnpm

qn wrapper for cnpm
JavaScript
1
star