This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 744
Deploy
alsotang edited this page Sep 3, 2019
·
25 revisions
- Node >= 6.11.3
- MySQL >= 5.7.0, include
mysqld
andmysql
cli - Simple File Store Service, like Amazon S3, qiniu, aliyun-oss, tfs, upyun
# clone from github
$ git clone git://github.com/cnpm/cnpmjs.org.git $HOME/cnpmjs.org
$ cd $HOME/cnpmjs.org
# create mysql tables
$ mysql -u yourname -p
mysql> create database cnpmjs
mysql> use cnpmjs;
mysql> source docs/db.sql
replace local file system with your preferred storage service. see https://github.com/cnpm/cnpmjs.org/wiki/NFS-Guide
$ vim config/config.js
config database and admin's username
module.exports = {
debug: false,
enableCluster: true, // enable cluster mode
enablePrivate: true, // enable private mode, only admin can publish, other user just can sync package from source npm
database: {
db: 'cnpmjstest',
host: 'localhost',
port: 3306,unknown database cnpmjs
username: 'cnpmjs',
password: 'cnpmjs123'
},
admins: {
admin: 'admin@cnpmjs.org',
},
syncModel: 'exist'// 'none', 'all', 'exist'
};
$ npm install --build-from-source --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/mirrors/node
$ npm run start
#open registry and web
# registry
open http://localhost:7001
# web
open http://localhost:7002
Copyright @ 2013 - present cnpmjs.org