Start.serve owns the full server lifecycle by calling Bun.serve() and BunRuntime.runMain. Serverless platforms like Cloudflare Workers or Deno Deploy expect a fetch handler export.
Add Start.export that accepts layers same as Start.pack but returns a fetch(request: Request): Promise<Response> instead of starting a server.
Start.serveowns the full server lifecycle by callingBun.serve()andBunRuntime.runMain. Serverless platforms like Cloudflare Workers or Deno Deploy expect afetchhandler export.Add
Start.exportthat accepts layers same asStart.packbut returns afetch(request: Request): Promise<Response>instead of starting a server.