|
@ -21,12 +21,12 @@ args.option('qndmn', 'qiniuDomain'); |
|
|
const flags = args.parse(process.argv); |
|
|
const flags = args.parse(process.argv); |
|
|
|
|
|
|
|
|
const FS_UNIAPP_DB = process.env.FS_UNIAPP_DB || flags.pg; |
|
|
const FS_UNIAPP_DB = process.env.FS_UNIAPP_DB || flags.pg; |
|
|
const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost; |
|
|
// const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost;
|
|
|
|
|
|
|
|
|
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn; |
|
|
const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn; |
|
|
const QINIU_BUCKET_RESOURCE = process.env.QINIU_BUCKET_RESOURCE || flags.qnbkt; |
|
|
const QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt; |
|
|
const QINIU_AK = process.env.QINIU_AK || flags.qnak; |
|
|
const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak; |
|
|
const QINIU_SK = process.env.QINIU_SK || flags.qnsk; |
|
|
const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk; |
|
|
|
|
|
|
|
|
if (!FS_UNIAPP_DB) { |
|
|
if (!FS_UNIAPP_DB) { |
|
|
console.log('缺少启动参数,异常退出'); |
|
|
console.log('缺少启动参数,异常退出'); |
|
@ -41,11 +41,11 @@ const product = { |
|
|
{ |
|
|
{ |
|
|
entry: require('@fs/attachment').entry, |
|
|
entry: require('@fs/attachment').entry, |
|
|
opts: { |
|
|
opts: { |
|
|
local: { |
|
|
// local: {
|
|
|
origin: LOCAL_SVR_ORIGIN || `http://localhost:${flags.port || 8080}`, |
|
|
// origin: LOCAL_SVR_ORIGIN || `http://localhost:${flags.port || 8080}`,
|
|
|
rootPath: 'static', |
|
|
// rootPath: 'static',
|
|
|
childPath: 'upload', |
|
|
// childPath: 'upload',
|
|
|
}, |
|
|
// },
|
|
|
qiniu: { |
|
|
qiniu: { |
|
|
domain: QINIU_DOMAIN_QNDMN_RESOURCE, |
|
|
domain: QINIU_DOMAIN_QNDMN_RESOURCE, |
|
|
bucket: QINIU_BUCKET_RESOURCE, |
|
|
bucket: QINIU_BUCKET_RESOURCE, |
|
|