import { Hono } from 'hono' import { cors } from 'hono/cors' const app = new Hono<{ Bindings: Env }>() // blog-search import * as blog_search from './blog_search' app.use(blog_search.ROUTE_PATH, (c, next) => { return cors({ origin: c.env.ALLOWED_ORIGINS, allowMethods: ['POST'], allowHeaders: ['Content-Type'], maxAge: 86400, })(c, next); }) app.post(blog_search.ROUTE_PATH, blog_search.handle) export default { fetch: app.fetch, } as ExportedHandler