|
@ -19,9 +19,6 @@ args.option(['r', 'report-node'], '报表进程地址'); |
|
|
|
|
|
|
|
|
const flags = args.parse(process.argv); |
|
|
const flags = args.parse(process.argv); |
|
|
|
|
|
|
|
|
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl; |
|
|
|
|
|
const FS_REPORT_NODE = process.env.FS_REPORT_NODE || flags.reportNode || 'http://10.8.30.59:8083' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!FS_UNIAPP_API) { |
|
|
if (!FS_UNIAPP_API) { |
|
|
console.log('缺少启动参数,异常退出'); |
|
|
console.log('缺少启动参数,异常退出'); |
|
@ -39,20 +36,11 @@ const product = { |
|
|
|
|
|
|
|
|
match: /^\/_api\//, |
|
|
match: /^\/_api\//, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, { |
|
|
{ |
|
|
|
|
|
entry: require('./middlewares/proxy').entry, |
|
|
entry: require('./middlewares/proxy').entry, |
|
|
opts: { |
|
|
opts: { |
|
|
|
|
|
host: 'https://report.amap.com', |
|
|
host: FS_REPORT_NODE, |
|
|
match: /^\/_godTrans\//, |
|
|
match: /^\/_report\//, |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
entry: require('./routes').entry, |
|
|
|
|
|
opts: { |
|
|
|
|
|
apiUrl: FS_UNIAPP_API, |
|
|
|
|
|
staticRoot: './client', |
|
|
|
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, { |
|
|
entry: require('./client').entry,// 静态信息
|
|
|
entry: require('./client').entry,// 静态信息
|
|
|