Merge pull request #168 from amark/develop

Develop
This commit is contained in:
Mark Nadal 2016-02-11 10:24:59 -08:00
commit 0699fb8137
4 changed files with 24 additions and 4 deletions

View File

@ -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.

View File

@ -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');

View File

@ -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);
});
}({}));

View File

@ -1,6 +1,6 @@
{
"name": "gun",
"version": "0.3.4",
"version": "0.3.5",
"description": "Graph engine",
"main": "index.js",
"scripts": {