|
|
@ -16,6 +16,9 @@ args.option('apiPomsUrl', 'webapi的URL 外网可访问'); |
|
|
|
args.option('apiAnxinyunUrl', '安心云 api'); |
|
|
|
args.option('apiEmisUrl', '企业管理 api'); |
|
|
|
args.option('iotVcmpWeb', 'IOT 视频服务'); |
|
|
|
args.option('pomsMonitor', '运维监控 web'); |
|
|
|
args.option('dcWeb', '报表中心web'); |
|
|
|
|
|
|
|
|
|
|
|
// 七牛
|
|
|
|
args.option('qnak', 'qiniuAccessKey'); |
|
|
@ -30,6 +33,8 @@ const API_POMS_URL = process.env.API_POMS_URL || flags.apiPomsUrl; |
|
|
|
const API_EMIS_URL = process.env.API_EMIS_URL || flags.apiEmisUrl; |
|
|
|
const API_ANXINYUN_URL = process.env.API_ANXINYUN_URL || flags.apiAnxinyunUrl; |
|
|
|
const IOT_VIDEO_WEB = process.env.IOT_VIDEO_WEB || flags.iotVcmpWeb; |
|
|
|
const POMS_MONITOR = process.env.POMS_MONITOR || flags.pomsMonitor; |
|
|
|
const DC_WEB = process.env.DC_WEB || flags.dcWeb; |
|
|
|
|
|
|
|
// 七牛
|
|
|
|
const ANXINCLOUD_QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak; |
|
|
@ -41,6 +46,7 @@ const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMA |
|
|
|
if ( |
|
|
|
!API_URL |
|
|
|
|| !API_ANXINYUN_URL |
|
|
|
|| !POMS_MONITOR || !DC_WEB |
|
|
|
|| !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || !IOT_VIDEO_WEB) { |
|
|
|
console.log('缺少启动参数,异常退出'); |
|
|
|
args.showHelp(); |
|
|
@ -85,6 +91,8 @@ const product = { |
|
|
|
opts: { |
|
|
|
apiUrl: API_POMS_URL, |
|
|
|
iotVcmpWeb: IOT_VIDEO_WEB, |
|
|
|
pomsMonitor: POMS_MONITOR, |
|
|
|
dcWeb: DC_WEB, |
|
|
|
staticRoot: './client', |
|
|
|
qiniu: { |
|
|
|
fetchUrl: '/_file-server', |
|
|
|