Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Context Middleware for Express
import express, { Request } from 'express';
import Context from './context'
const app = express();
// Middleware
app.use((req: Request, res: any, next: any) => {
Context.bind(req);
next();
});
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment