Skip to content

dannycoates/m2n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

m2n

A Mongrel2 Handler for node.js

Usage

Add m2n to your package.json

	{
		"dependencies" : {
			"m2n": "~0.0.1"
		}
	}

API

m2n mostly follows the server half of the node http api

The main difference is that it neither the request or response objects have access to a raw socket. If you need socket access, m2n is not for you.

You also listen on zmq sockets instead of tcp.

	listen(senderId, pullAddress, pubAddress)

example

var m2n = require('m2n')

m2n.createServer(function (req, res) {
	res.writeHead(200, {'Content-Type': 'text/plain'})
	res.end('Hello World\n')
}).listen('foobar', 'tcp://127.0.0.1:9999', 'tcp://127.0.0.1:9998')

TODO

  • add Mongrel2 advanced features

About

Mongrel2 Handler for node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published