MCPcopy Index your code
hub / github.com/dan-manges/m2node

github.com/dan-manges/m2node @0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.2.0 ↗ · + Follow
8 symbols 11 edges 8 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

m2node

m2node is a mongrel2 handler for node

install

npm install m2node

example

var http = require('http'),
    m2node = require('m2node');

var server = http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
});

m2node.run(server, {
  send_spec: 'tcp://127.0.0.1:9996',
  recv_spec: 'tcp://127.0.0.1:9997'
});

configuration

The configuration is from the perspective of the handler, so the send_spec in your mongrel2 config should match the recv_spec in your node config.

example - express

here's an example of serving an app built using the express framework with m2node

var express = require('express'),
    m2node = require('m2node');

var app = express.createServer();

app.get('/', function (req, res) {
  res.send('Hello World')
});

m2node.run(app, {
  send_spec: 'tcp://127.0.0.1:9996'
  recv_spec: 'tcp://127.0.0.1:9997'
});

contributors

see package.json

Core symbols most depended-on inside this repo

ctor
called by 0
lib/m2node/handler.js
Handler
called by 0
lib/m2node/handler.js
MongrelRequest
called by 0
lib/m2node/mongrel_request.js
ctor
called by 0
lib/m2node/fake_socket.js
FakeSocket
called by 0
lib/m2node/fake_socket.js

Shape

Function 8

Languages

TypeScript100%

Modules by API surface

lib/m2node/handler.js4 symbols
lib/m2node/fake_socket.js3 symbols
lib/m2node/mongrel_request.js1 symbols

For agents

$ claude mcp add m2node \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact