本页还没有译文
本页 4 段还没译成Español,下面显示的是英文原文。Hot reload an HTTP server
还没翻译译自英文(bun.com)本页 4 段都还没译
The --hot flag runs a file with hot reloading enabled. When that file or a file it imports changes, Bun re-runs it. Bun does not watch files that no module imports, such as .env, bunfig.toml, and tsconfig.json. Restart Bun to apply a change to one of those files.
bun --hot run index.tsBun detects when you are running an HTTP server with Bun.serve(). It reloads your fetch handler when source files change, without restarting the bun process. This makes hot reloads nearly instantaneous.
Note
Hot reloading doesn't reload the page in your browser.
Bun.serve({
port: 3000,
fetch(req) {
return new Response("Hello world");
},
});AI 翻译查看英文原文