mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
merged major improvements and deployed to heroku
This commit is contained in:
parent
42d90ba22c
commit
96bbb102f0
@ -4,7 +4,7 @@
|
||||
"description": "Example gun apps"
|
||||
, "version": "0.0.1"
|
||||
, "engines": {
|
||||
"node": "~>0.8.x"
|
||||
"node": "~>0.10.x"
|
||||
}
|
||||
, "dependencies": {
|
||||
"express": "~>4.9.0",
|
||||
|
@ -129,6 +129,7 @@
|
||||
reply.loaded = true;
|
||||
}));
|
||||
// could there be a timing error somewhere in here?
|
||||
var setImmediate = setImmediate || setTimeout; // TODO: BUG: This should be cleaned up, but I want Heroku to work.
|
||||
setImmediate(function(){ // do not do it right away because gun.load above is async, this should be cleaner.
|
||||
var context = gun.union(req.body, function check(err, ctx){ // check if the body is valid, and get it into cache immediately.
|
||||
context = ctx || context;
|
||||
@ -140,7 +141,7 @@
|
||||
cb({headers: reply.headers, body: {ok: "Persisted."}});
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 0);
|
||||
gun.server.on('network').emit(req);
|
||||
}
|
||||
tran.post.key = function(req, cb){ // key hook!
|
||||
|
Loading…
x
Reference in New Issue
Block a user