clkao/pgrest — pull request #45 by poga (2013-11-17 19:41:35+00:00)
Title: Implement Socket.io interface

Enable Socket.io on PgREST

pgrest --db test --websocket

All REST api is implemented on websocket

More importantly, you can subscribe to a collection to be notified when it's being inserted

var socket = io.connect('http://HOST:PORT');
s.on("CHANNEL:foo", function (data) {
// called every time something is inserted into foo
});
s.emit("SUBSCRIBE:foo");

test [included](test/socket.ls)

Authentication is not implemented yet. I think I should wait [this issue](https://github.com/clkao/pgrest/issues/35) to complete and do some follow-up work?