From ed9b234c213321642a4f41b284c0f3a4f69c69fd Mon Sep 17 00:00:00 2001 From: sirpy Date: Mon, 6 May 2019 23:46:35 +0300 Subject: [PATCH] fix: settings can be from opts or from process.env --- lib/rs3.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rs3.js b/lib/rs3.js index 5b56c2e9..339582a0 100644 --- a/lib/rs3.js +++ b/lib/rs3.js @@ -7,7 +7,7 @@ var u, AWS; Gun.on('create', function(root){ this.to.next(root); var opt = root.opt; - if(!process.env.AWS_S3_BUCKET){ return } + if(!opt.s3 && !process.env.AWS_S3_BUCKET){ return } opt.batch = opt.batch || (1000 * 10); opt.until = opt.until || (1000 * 3); opt.chunk = opt.chunk || (1024 * 1024 * 10); // 10MB @@ -101,4 +101,4 @@ function Store(opt){ return store; } -module.exports = Store; \ No newline at end of file +module.exports = Store;