Skip to content

NicolaiSchmid/express-request-cuid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

express-request-cuid

express-request-cuid

Overview

express-required-cuid provides a simple express/connect middleware for creating a new cuid for each request and appending an x-request-id header to the request and adding the requestId and id property to the request-object.

Usage

Just like above:

import requestCuid from 'express-request-cuid';
import express from 'express';

const app = express();

app.use(requestCuid());

Import the module and use it. It works with CJS require as well. For any additional configuration, please open a new issue

Have fun coding!

(Types are included)