0.0.2 • Published 9 years ago

zttp v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

zttp

open http protocol service over the zmq STREAM socket.

based on ZMQ_STREAM and ideas from hintjens' web server.

install

there's an npm package dependency on zmq.

you'll need:

$ npm i zhttp

use

var z = require('zttp').listen('tcp://127.0.0.1:3000');

z.route('/zmq/endpoint', function(req,res){

  var response = '<!DOCTYPE html><head><meta charset="UTF-8"></head><body>'
    + '<p>Hello from zeromq.</p></body></html>' //for now just plain text html

  res.send(response);

});

MIT