summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYukai Huang2016-11-17 16:28:02 +0800
committerYukai Huang2016-11-17 16:28:02 +0800
commit46a4fe10abdec2cfb102336c8f6971eb7202b08b (patch)
tree498ef8ab72025ad753ce73a59e1efc2a415a7d49 /lib
parent975b1f248f99251462741f8725b047391fa367e4 (diff)
Add env config prefix
Diffstat (limited to 'lib')
-rw-r--r--lib/config.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/config.js b/lib/config.js
index 99b94279..a906dfa4 100644
--- a/lib/config.js
+++ b/lib/config.js
@@ -57,15 +57,15 @@ var heartbeattimeout = config.heartbeattimeout || 10000;
var documentmaxlength = config.documentmaxlength || 100000;
// image upload setting, available options are imgur/s3/filesystem
-var imageUploadType = config.imageUploadType || 'imgur';
+var imageUploadType = process.env.HMD_IMAGE_UPLOAD_TYPE || config.imageUploadType || 'imgur';
config.s3 = config.s3 || {};
var s3 = {
- accessKeyId: process.env.S3_ACCESS_KEY_ID || config.s3.accessKeyId,
- secretAccessKey: process.env.S3_SECRET_ACCESS_KEY || config.s3.secretAccessKey,
- region: process.env.S3_REGION || config.s3.region
+ accessKeyId: process.env.HMD_S3_ACCESS_KEY_ID || config.s3.accessKeyId,
+ secretAccessKey: process.env.HMD_S3_SECRET_ACCESS_KEY || config.s3.secretAccessKey,
+ region: process.env.HMD_S3_REGION || config.s3.region
}
-var s3bucket = process.env.S3_BUCKET || config.s3.bucket;
+var s3bucket = process.env.HMD_S3_BUCKET || config.s3.bucket;
// auth
var facebook = (process.env.HMD_FACEBOOK_CLIENTID && process.env.HMD_FACEBOOK_CLIENTSECRET) ? {