Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Abandoned. Contact me if you want to take over. Mongrel2 handler for node

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 mongrel2.conf
Octocat-spinner-32 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.