Context is not available, context storage middleware

const app = new Hono<Binds>()

app.use(contextStorage());

app.use(async (c, next) => {
  c.set("dev", c.env.ENV === "DEV");
  await next();
});

//app.use('*', extractAuthedUserMiddleare);

const routes = app
    .route("/template", new TemplatesController().routes())

export default app;
export type AppType = typeof routes;

export const client = hc<AppType>('/');
export type ClientType = typeof client;
Was this page helpful?