mirror of
https://github.com/amark/gun.git
synced 2025-06-03 20:56:43 +00:00
fix: settings can be from opts or from process.env
This commit is contained in:
parent
1c44bf900e
commit
ed9b234c21
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user