Express 和其他主要的 Node.js HTTP 库应该开箱即用。Bun 实现了这些库依赖的Documentation Index
Fetch the complete documentation index at: https://bun.zhcndoc.com/llms.txt
Use this file to discover all available pages before exploring further.
node:http 和 node:https 模块。
更多详细的兼容性信息,请参阅 运行时 > Node.js API 页面。
terminal
使用 Express 定义一个 HTTP 路由并启动服务器:
在
localhost 上启动服务器:
terminal