|
@ -27,12 +27,6 @@ const ANXINCLOUD_QINIU_SECRETKEY = process.env.ANXINCLOUD_QINIU_SECRETKEY || fla |
|
|
const ANXINCLOUD_QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt; |
|
|
const ANXINCLOUD_QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt; |
|
|
const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn; |
|
|
const ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn; |
|
|
|
|
|
|
|
|
//阿里OSS
|
|
|
|
|
|
const ALI_OSS_ACCESSKEY = process.env.ALI_OSS_ACCESSKEY || flags.aliOssAccessKey; |
|
|
|
|
|
const ALI_OSS_SECRETKET = process.env.ALI_OSS_SECRETKET || flags.aliOssSecretKey; |
|
|
|
|
|
const ALI_OSS_BUCKET = process.env.ALI_OSS_BUCKET || flags.aliOssBucket; |
|
|
|
|
|
const ALI_OSS_REGION = process.env.ALI_OSS_REGION || flags.aliOssRegion; |
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
!FS_UNIAPP_API |
|
|
!FS_UNIAPP_API |
|
|
// || !ANXINCLOUD_QINIU_ACCESSKEY
|
|
|
// || !ANXINCLOUD_QINIU_ACCESSKEY
|
|
@ -48,10 +42,6 @@ if ( |
|
|
const product = { |
|
|
const product = { |
|
|
port: flags.port || 8080, |
|
|
port: flags.port || 8080, |
|
|
staticDirs: [path.join(__dirname, './client')], |
|
|
staticDirs: [path.join(__dirname, './client')], |
|
|
frontParams: { |
|
|
|
|
|
// 以大写字母命名
|
|
|
|
|
|
FS_API_ROOT: FS_UNIAPP_API |
|
|
|
|
|
}, |
|
|
|
|
|
mws: [ |
|
|
mws: [ |
|
|
{ |
|
|
{ |
|
|
entry: require('./middlewares/proxy').entry, |
|
|
entry: require('./middlewares/proxy').entry, |
|
@ -81,13 +71,6 @@ const product = { |
|
|
qiniu: { |
|
|
qiniu: { |
|
|
fetchUrl: '/_file-server', |
|
|
fetchUrl: '/_file-server', |
|
|
domain: ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE |
|
|
domain: ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE |
|
|
}, |
|
|
|
|
|
aliOss: { |
|
|
|
|
|
fetchUrl: '/_file-ali-server', |
|
|
|
|
|
accessKey: ALI_OSS_ACCESSKEY, |
|
|
|
|
|
secretKey: ALI_OSS_SECRETKET, |
|
|
|
|
|
bucket: ALI_OSS_BUCKET, |
|
|
|
|
|
region: ALI_OSS_REGION |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|