Browse Source

(*)修改环境变量

master
周沫沫历险记 2 years ago
parent
commit
4e72f53a34
  1. 3
      README.md
  2. 6
      web/config.js

3
README.md

@ -40,7 +40,8 @@ CLICKHOUST_PEP_EMIS //clickhouse 的 emis 库名
## web 启动环境变量
### 企业管理
```
API_EMIS_URL //api
API_URL //api
API_DC_URL //外网可访问的api地址
```
### 七牛
```

6
web/config.js

@ -23,7 +23,7 @@ args.option('pmrs', 'pmReportService');
const flags = args.parse(process.argv);
const API_URL = process.env.API_URL || flags.apiUrl;
const API_HR_URL = process.env.API_HR_URL || flags.apiHrUrl;
const API_DC_URL = process.env.API_DC_URL || flags.apiHrUrl;
// 七牛
const ANXINCLOUD_QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
@ -36,7 +36,7 @@ const ANXINCLOUD_PM_SERVICES = process.env.ANXINCLOUD_PM_SERVICES || flags.pmrs;
if (
!API_URL
|| !API_HR_URL
|| !API_DC_URL
|| !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE
) {
console.log('缺少启动参数,异常退出');
@ -68,7 +68,7 @@ const product = {
}, {
entry: require('./routes').entry,
opts: {
apiUrl: API_HR_URL,
apiUrl: API_DC_URL,
staticRoot: './client',
qiniu: {
fetchUrl: '/_file-server',

Loading…
Cancel
Save