# clone from github
$ git clone git://github.com/cnpm/cnpmjs.org.git $HOME/cnpmjs.org
$ cd $HOME/cnpmjs.org
修改配置
$ vim config/config.js
module.exports = {
bindingHost: '127.0.0.1', // only binding on 127.0.0.1 for local access
// input your custom config here
admin: {
'admin': '***'
},
/**
* database config
*/
database: {
db: 'cnpmjs',
username: 'postgres',
password: '',
// the sql dialect of the database
// - currently supported: 'mysql', 'sqlite', 'postgres', 'mariadb'
dialect: 'postgres',
// custom host; default: 127.0.0.1
host: '127.0.0.1',
// custom port; default: 3306
port: ***,
// use pooling in order to reduce db connection overload and to increase speed
// currently only for mysql and postgresql (since v1.5.0)
pool: {
maxConnections: 10,
minConnections: 0,
maxIdleTime: 30000
},
logging: !!process.env.SQL_DEBUG,
},
// registry scopes, if don't set, means do not support scopes
scopes: ['@mycnpm']
};
当前最新版本:2.0.0-rc.15
修改配置
安装依赖
创建数据库
初始化数据库
启动服务
For Windows: node --harmony dispatch.js
后台进程启动
关闭后台进程
检查
注册自启动
输入脚本保存:
增加软链接:
CNPM 使用文档
CNPM 使用文档