UNPKG

@upstash/qstash

Version:

Official Typescript client for QStash

23 lines (21 loc) 604 B
import { serve } from "./chunk-H3E2J2K6.mjs"; // platforms/hono.ts var serve2 = (routeFunction, options) => { const handler = async (context) => { const environment = context.env; const request = context.req.raw; const serveHandler = serve(routeFunction, { // when hono is used without cf workers, it sends a DebugHTTPServer // object in `context.env`. don't pass env if this is the case: env: "QSTASH_TOKEN" in environment ? environment : void 0, ...options }); return await serveHandler(request); }; return handler; }; export { serve2 as serve };