环境介绍:
1.mac(自带msq,就没有去额外的安装)
搭建方法:
1. npm install -g cnpm
2. npm install -g cnpmjs.org
3. 修改配置文件~/·cnpmjs.org/config/index
4. 配置文件如下:
{
"debug": false,
"enableCluster": true,
"mysqlServers": [
{
"host": "host",
"port": 3306,
"user": "root",
"password": "root"
}
],
"mysqlDatabase": "cnpmjs",
"enablePrivate": true,
"admins": {
"senntyou": "jiangjinbelief@163.com"
},
"syncModel": "exist",
"scopes": [
"@test"
],
"registryHost": "xxx.xxx.x.xxx",
"officialNpmRegistry": "https://registry.npm.taobao.org"
/**
* database config
*/
database: {
db: 'cnpmjs',
username: 'root',
password: 'root',
dialect: 'mysql',
host: '127.0.0.1',
}
5.在cnpmjs.org 下运行npm run dev
6.报错了,msq需要 sqlite3 ,于是安装 cnpm install sqlite3
7.npm run dev
8.127.0.0.1:7002
9.如下图:第一步算是可以了
10.后续更新如何上传包。。。。