connect-request-id

0.0.0 • Public • Published

Connect Request ID

Does one thing (but might not do that particuarly well). A connect middleware that creates unique ID's for each requests using node-uuid or a supplied HTTP header. Heavily (if not completely) based upon restify's implementation

This module has lots of room for being more configurable so if you want to do that go for it, PR's welcome.

Usage

npm install [--save] connect-request-id

    var requestId = require('connect-request-id');
    var connect = require('connect');
 
    var app = connect();
    app.use(requestId())

If the inbound request has the header request-id it will set the property id of the request to whatever the value of the header is, as long as the property hasn't already been defined.

Tests

The tests are completly whacky, I was super tired when I wrote this and have honestly no idea quite how they ended up like they did.

Would be nice to beef them up a bit to actually test express framework too.

Readme

Keywords

none

Package Sidebar

Install

npm i connect-request-id

Weekly Downloads

2

Version

0.0.0

License

BSD

Last publish

Collaborators

  • sandfox