socket.io.requestify

0.0.2 • Public • Published

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

/socket.io.requestify/

    Package Sidebar

    Install

    npm i socket.io.requestify

    Weekly Downloads

    0

    Version

    0.0.2

    License

    none

    Last publish

    Collaborators

    • dotkenny