socket.io.requestify
v0.0.2
Published
Reroute web socket events as web requests
Downloads
4
Readme
socket.io.requestify
synopsis
Re-route Socket.io events as regular web requests. This module makes more sense in the context of backbone.socket.io.
usage
install
npm install socket.io.requestify
server code
var io = require('socket.io');
var Requestify = require('socket.io.requestify');
new Requestify(8080, io);
new Requestify('http://localhost:80', io);
new Requestify({
url: 'http://foo:3000',
socket: io
});
new Requestify({
port: 3000,
socket: io
});
new Requestify({
fetchEvent: 'pull',
socket: io
});
todo
- Ensure 'AJAX' urls are all relative to the server.
- More unit tests