Jules
Final deployment with all fixes and verified content
c09f67c
import { db } from "@midday/db/client";
import type { MiddlewareHandler } from "hono";
/**
* Database middleware that connects to the database and sets it on context
*/
export const withDatabase: MiddlewareHandler = async (c, next) => {
// Use singleton database instance
c.set("db", db);
await next();
};