Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
a wrapper around dnode for doing dnode requests over raw http
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples/basic
README.md
index.js
package.json
test.js

README.md

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

install:

$ npm install dohttp

Tests:

$ npm test

License:

MIT/X11.

Something went wrong with that request. Please try again.