Skip to content
JavaScript CoffeeScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
mongrel2.conf
package.json

README.md

node-mongrel2

A Mongrel2 handler for nodejs.

Howto

This isn't an intro to Mongrel2. Try the Mongrel2 Manual for that.

Install with npm:

% npm install mongrel2

Use it in your code:

var mongrel2 = require('mongrel2');

// mongrel2.connect(recv_spec, send_spec, identify, callback)
// recv_spec is what you configure as your send_spec in your mongrel2.conf
// send_spec is vice versa
mongrel2.connect('tcp://127.0.0.1:9997', 'tcp://127.0.0.1:9996', 'test', function(msg, reply) {
  // do some logic
  reply(200, { 'Content-Type': 'text/plain' }, "Hello, World!\n" + JSON.stringify(msg));
});

Copyright

Copyright (c) 2010 Daniel Huckstep. See LICENSE for details.

Something went wrong with that request. Please try again.