connect-pinba
v1.0.0
Published
Pinba middleware for Connect
Downloads
3
Maintainers
Readme
Connect-pinba
Pinba middleware for Connect node.js framework, using node-pinba.
Pinba is a MySQL storage engine that acts as a realtime monitoring/statistics server using MySQL as a read-only interface. Connect-pinba brings data automatic statistics sending to Pinba server from your node.js application.
Check out the Github repo for the source code.
Installation
You can install this module via npm:
$> npm install connect-pinba
Usage
This middleware must be on the first called.
var connect_pinba = require('connect-pinba');
var connect = require('connect');
var server = connect.createServer(
connect_pinba({
schema: 'http',
server_name: 'example.com',
pinba_server: 'pinbadb.vlan'
}),
function(req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World');
}
).listen(3000);
connect_pinba
take only one parameter, a hash that will be passed to Pinba.Request
constructor.
See node-pinba docs for detailed information.
Contributing
To contribute any patches, simply fork this repository using GitHub and send a pull request to me. Thanks!
License
MIT license. See license text in file LICENSE.