mirror of
https://github.com/amark/gun.git
synced 2025-06-06 14:16:44 +00:00
Merge pull request #746 from sirpy/patch-1
fix: settings can be from opts or from process.env
This commit is contained in:
commit
86e78f1e5d
@ -7,7 +7,7 @@ var u, AWS;
|
|||||||
Gun.on('create', function(root){
|
Gun.on('create', function(root){
|
||||||
this.to.next(root);
|
this.to.next(root);
|
||||||
var opt = root.opt;
|
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.batch = opt.batch || (1000 * 10);
|
||||||
opt.until = opt.until || (1000 * 3);
|
opt.until = opt.until || (1000 * 3);
|
||||||
opt.chunk = opt.chunk || (1024 * 1024 * 10); // 10MB
|
opt.chunk = opt.chunk || (1024 * 1024 * 10); // 10MB
|
||||||
@ -101,4 +101,4 @@ function Store(opt){
|
|||||||
return store;
|
return store;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Store;
|
module.exports = Store;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user