Browse Source

clickhouse params

release_0.0.2
巴林闲侠 2 years ago
parent
commit
5ed9ad0f76
  1. 22
      api/config.js

22
api/config.js

@ -36,6 +36,7 @@ args.option('clickHousePort', 'clickHouse Port');
args.option('clickHouseAnxincloud', 'clickHouse 安心云数据库名称');
args.option('clickHousePepEmis', 'clickHouse 项企数据库名称');
args.option('clickHouseProjectManage', 'clickHouse 项目管理数据库名称');
args.option('clickHouseVcmp', 'clickHouse 视频平台数据库名称');
const flags = args.parse(process.argv);
@ -71,6 +72,7 @@ const CLICKHOUST_PORT = process.env.CLICKHOUST_PORT || flags.clickHousePort
const CLICKHOUST_ANXINCLOUD = process.env.CLICKHOUST_ANXINCLOUD || flags.clickHouseAnxincloud
const CLICKHOUST_PEP_EMIS = process.env.CLICKHOUST_PEP_EMIS || flags.clickHousePepEmis
const CLICKHOUST_PROJECT_MANAGE = process.env.CLICKHOUST_PROJECT_MANAGE || flags.clickHouseProjectManage
const CLICKHOUST_VCMP = process.env.CLICKHOUST_VCMP || flags.clickHouseVcmp
if (
!POMS_DB
@ -80,7 +82,7 @@ if (
|| !API_EMIS_URL
|| !QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK
|| !CLICKHOUST_URL || !CLICKHOUST_PORT
|| !CLICKHOUST_ANXINCLOUD || !CLICKHOUST_PEP_EMIS || !CLICKHOUST_PROJECT_MANAGE
|| !CLICKHOUST_ANXINCLOUD || !CLICKHOUST_PEP_EMIS || !CLICKHOUST_PROJECT_MANAGE || !CLICKHOUST_VCMP
) {
console.log('缺少启动参数,异常退出');
args.showHelp();
@ -153,9 +155,21 @@ const product = {
url: CLICKHOUST_URL,
port: CLICKHOUST_PORT,
db: [{
name:'',
db:''
}]
name: 'anxinyun',
db: CLICKHOUST_ANXINCLOUD
}, {
name: 'pepEmis',
db: CLICKHOUST_PEP_EMIS
}, {
name: 'projectManage',
db: CLICKHOUST_PROJECT_MANAGE
}, {
name: 'anxinyun',
db: CLICKHOUST_ANXINCLOUD
}, {
name: 'vcmp',
db: CLICKHOUST_VCMP
},]
}
}
}

Loading…
Cancel
Save