Merge pull request #746 from sirpy/patch-1

fix: settings can be from opts or from process.env
This commit is contained in:
Mark Nadal 2019-05-07 19:56:25 -07:00 committed by GitHub
commit 86e78f1e5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
module.exports = Store;