Bun runtime for Vercel Functions now accepts Bun.serve as an entrypoint
Vercel Blog - AIAug 104 min read
The Bun runtime for Vercel Functions now supports Bun.serve() as a function entrypoint, including WebSocket handlers. The server you run locally with Bun deploys as-is, without being wrapped in a framework. Enable the runtime by setting "bunVersion": "1.x" in vercel.json . Deploy a routes-based server Create a server with a routes map in server.ts at the project root. Accept WebSocket connections Add a websocket handler and call server.upgrade(request) in fetch to upgrade matching requests. The rest of the server stays the same. WebSocket connections run on Fluid compute with Active CPU pricin
