Skip to main content
Express and other major Node.js HTTP libraries should work in Bun without changes. Bun implements the node:http and node:https modules that these libraries rely on.
See Node.js compatibility for details.
terminal

To define an HTTP route and start a server with Express:
https://mintcdn.com/bun-1dd33a4e/JUhaF6Mf68z_zHyy/icons/typescript.svg?fit=max&auto=format&n=JUhaF6Mf68z_zHyy&q=85&s=7ac549adaea8d5487d8fbd58cc3ea35bserver.ts

To start the server on localhost:
terminal