import hello from "./hello.ts"
type Env = {Variables: { db: typeof db }}
const factory = createFactory<Env>({
initApp: (app) => {
app.use(async (ctx, next) => {
ctx.set("db", db)
await next()
})
},
})
export const app = factory.createApp()
app.route("hello", hello)
import hello from "./hello.ts"
type Env = {Variables: { db: typeof db }}
const factory = createFactory<Env>({
initApp: (app) => {
app.use(async (ctx, next) => {
ctx.set("db", db)
await next()
})
},
})
export const app = factory.createApp()
app.route("hello", hello)