index.ts
1 import { createNamespace } from "cls-hooked"; 2 import type { Application } from "../declarations"; 3 import correlation from "./correlation"; 4 import requestId from "./request-id"; 5 const logNameSpace = createNamespace("logger"); 6 7 export default function (app: Application): void { 8 // Add your custom middleware here. Remember that 9 // in Express, the order matters. 10 app.use(correlation(logNameSpace)); 11 app.use(requestId()); 12 }