mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
commit
0699fb8137
@ -1,5 +1,9 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 0.3.5
|
||||
|
||||
- Fixed server push.
|
||||
|
||||
## 0.3.4
|
||||
|
||||
- Breaking Change! `list.set(item)` returns the item's chain now, not the list chain.
|
||||
|
@ -1,4 +1,3 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
var http = require('http');
|
||||
var fs = require('fs');
|
||||
@ -28,5 +27,4 @@ var server = http.createServer(function(req, res){
|
||||
gun.wsp(server);
|
||||
server.listen(port, ip);
|
||||
|
||||
console.log('Server started on port ' + port + ' with /gun');
|
||||
|
||||
console.log('Server started on port ' + port + ' with /gun');
|
18
lib/wsp.js
18
lib/wsp.js
@ -209,5 +209,23 @@
|
||||
if(opt.server){
|
||||
wsp(opt.server);
|
||||
}
|
||||
|
||||
setTimeout(function(){ // hack it in :( for now, since 0.4.x will allow us to have multiple drivers.
|
||||
var proxy = gun.__.opt.wire;
|
||||
var driver = {
|
||||
put: function(graph, cb, opt){
|
||||
proxy.put(graph, cb, opt);
|
||||
var msg = {
|
||||
headers: {'Content-Type': 'application/json', id: gun.wsp.msg()},
|
||||
body: graph
|
||||
};
|
||||
gun.wsp.on('network').emit(msg);
|
||||
},
|
||||
get: proxy.get
|
||||
}
|
||||
gun.__.opt.wire = driver;
|
||||
gun.opt({wire: driver}, true);
|
||||
},1);
|
||||
|
||||
});
|
||||
}({}));
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gun",
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.5",
|
||||
"description": "Graph engine",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user