zttp
v0.0.2
Published
zmq socket http server
Downloads
11
Maintainers
Readme
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:
- zeromq v4+ on your system
- make sure zeromq.node works.
$ 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);
});