```js export const als = new AsyncLocalStorage(); router.get("/", async () => { return als.run(

export const als = new AsyncLocalStorage();

router.get("/", async () => {
    return als.run("foo", async () => {
        const resp = foo.bar();
        return new Response(resp);
    });
});


import { als } from ".";

export default {
    bar: () => {
        return als.getStore();
    },
};
Was this page helpful?