|
|
@ -16,9 +16,11 @@ dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md, |
|
|
|
args.option(['p', 'port'], '启动端口'); |
|
|
|
args.option(['u', 'api-url'], 'webapi的URL'); |
|
|
|
args.option(['r', 'report-node'], '报表进程地址'); |
|
|
|
args.option(['r', 'report-node'], '报表进程地址'); |
|
|
|
|
|
|
|
const flags = args.parse(process.argv); |
|
|
|
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl; |
|
|
|
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn; |
|
|
|
|
|
|
|
if (!FS_UNIAPP_API) { |
|
|
|
console.log('缺少启动参数,异常退出'); |
|
|
@ -35,6 +37,12 @@ const product = { |
|
|
|
host: FS_UNIAPP_API, |
|
|
|
match: /^\/_api\//, |
|
|
|
} |
|
|
|
}, { |
|
|
|
entry: require('./middlewares/proxy').entry, |
|
|
|
opts: { |
|
|
|
host: QINIU_DOMAIN_QNDMN_RESOURCE, |
|
|
|
match: /^\/_file-server\//, |
|
|
|
} |
|
|
|
}, { |
|
|
|
entry: require('./middlewares/proxy').entry, |
|
|
|
opts: { |
|
|
|