dohttp

Dnode over HTTP

npm install dohttp
2 downloads in the last week
4 downloads in the last month

Dnode over HTTP (DoHTTP)

a wrapper around dnode for doing dnode requests over raw http

Example:

server.js

var dohttp = require('dohttp');

dohttp.createServer({
  transform : function (s, cb) {
    cb(s.replace(/[aeiou]{2,}/, 'oo').toUpperCase())
  }
}).listen(5004);

client.js

var dohttp = require('dohttp');

var d = dohttp().request({
  host: 'localhost',
  port: 5004
}).on('remote', function (remote) {
  remote.transform('beep', function (s) {
    console.log('beep => ' + s);
    d.end();
  });
});

output:

(with server already running:)

$ node examples/basic/client.js 
beep => BOOP

Tests:

$ npm test

License:

MIT/X11.

npm loves you