Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import express, { Request } from 'express';
import Context from './context'
const app = express();
// ...
app.get('/foo', (req: Request, res) => {
const ctx: Context = Context.get(req);
// Here we can use our Context!
res.status(200).send(ctx.foo);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment