Socket.io adapter for puddle-hub to sync data server<=>browser
###Features:
[X] Server <=> Client sync
[X] Consists of Server and Client parts
[X] Conforms to Corpus CRUD API
[X] Does not use puddle syntax
[X] Synchronizes puddle-crud instances
Todo:
[ ] Optimistic and pessimistic events (fires instantly and upon server confirmation)
###Installation:
npm install puddle-socket
npm test # optional
###Usage:
//on the Server
var app = require('express')();
var server = require('http').Server(app);
var puddleSocket = require(‘puddle-socket’).server(server);
server.listen(80);
//on the Client
var puddleSocket = require(‘puddle-socket’).client();
puddleSocket.on('reset', function (state) {
//this will fire on each client reconnect to socket.IO.
//I.e. on browser start/refresh/connection restore
})
From now on any CRUD events/method calls will propagate among server and all it's clients. For puddle-socket API see puddle-hub API
- Fritz Obermeyer https://github.com/fritzo
- Yan T. https://github.com/yangit
Puddle was factored out of Pomagma in 2014.
Copyright 2013-2014 Fritz Obermeyer.
Puddle is licensed under the MIT license.