Skip to content

pomagma/puddle-socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status NPM Version NPM Dependencies Coverage Status

Puddle-socket

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

Contributors

Puddle was factored out of Pomagma in 2014.

License

Copyright 2013-2014 Fritz Obermeyer.
Puddle is licensed under the MIT license.

Releases

No releases published

Packages

No packages published