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