@parthar/express-request-id

1.0.1 • Public • Published

Express Request ID

Request ID Tracing middleware for ExpressJS

Installation

$ npm install @parthar/express-request-id --save

Usage

// setup expressjs middleware
var expressReqId = require("@parthar/express-request-id");
var express = require("express");
var app = express();
// use req-id when present on req[headerName]; otherwise, generate a uuid.v4()
// make req-id available on req[key], and add it to response headers
app.use(expressReqId({
    "headerName": "x-request-id",
    "key": "_xReqId"
}));

Readme

Keywords

Package Sidebar

Install

npm i @parthar/express-request-id

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

2.65 kB

Total Files

4

Last publish

Collaborators

  • partharamanujam