gun/test/server/http.js
2016-07-07 12:54:19 -07:00

15 lines
359 B
JavaScript

//client.js writes data up to a listening hub.js, which relays to a server.js that reads the data.
var http = require('http');
var Gun = require('../../index');
var gun = Gun({
file: 'http.json'
});
var server = http.createServer(function(req, res){});
gun.wsp(server);
server.listen(8080);
console.log('Server started on port ' + 8080 + ' with /gun');