@newstudios/express-middleware-requestid
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "@newstudios/express-middleware-requestid", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "A middleware that generates a unique Request ID for every incoming HTTP request in express.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
<div align="center"> | ||
<h1>koa2-middleware-requestid</h1> | ||
<h1>express-middleware-requestid</h1> | ||
</div> | ||
<p align="center"> | ||
A middleware that generates a unique Request ID for every incoming HTTP request in Koa2. | ||
A middleware that generates a unique Request ID for every incoming HTTP request in express. | ||
</p> | ||
@@ -34,6 +34,6 @@ | ||
# Using NPM | ||
$ npm install --save @newstudios/koa2-middleware-requestid | ||
$ npm install --save @newstudios/express-middleware-requestid | ||
# Using Yarn | ||
$ yarn add @newstudios/koa2-middleware-requestid | ||
$ yarn add @newstudios/express-middleware-requestid | ||
``` | ||
@@ -45,3 +45,3 @@ | ||
Use `@newstudios/koa2-middleware-requestid` as a middleware for a [koa](https://github.com/koajs/koa) app. By default, it generates a unique uuid (v4) and exposes it on the response via the `X-Request-ID` header. The id is also saved as part of the *ctx.req.id*、*ctx.request.id*、*ctx.id*. | ||
Use `@newstudios/express-middleware-requestid` as a middleware for a [koa](https://github.com/koajs/koa) app. By default, it generates a unique uuid (v4) and exposes it on the response via the `X-Request-ID` header. The id is also saved as part of the *ctx.req.id*、*ctx.request.id*、*ctx.id*. | ||
@@ -52,3 +52,3 @@ In the following example, the generated uuid is manually exposed on the body for debugging purposes: | ||
const Koa = require('koa'); | ||
const requestId = require('@newstudios/koa2-middleware-requestid'); | ||
const requestId = require('@newstudios/express-middleware-requestid'); | ||
const app = new Koa(); | ||
@@ -55,0 +55,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5041