diff options
author | 2023-09-13 20:52:43 -0700 | |
---|---|---|
committer | 2023-09-13 21:22:41 -0700 | |
commit | 631c8268665e23b0702311a7c7bb23ebf6c51c30 (patch) | |
tree | c82a2507fbf4007115a454797276b7da7a0a86ac | |
parent | 088bea026e6c49389f51ef6979c5e2d6dfd6d353 (diff) | |
download | bun-631c8268665e23b0702311a7c7bb23ebf6c51c30.tar.gz bun-631c8268665e23b0702311a7c7bb23ebf6c51c30.tar.zst bun-631c8268665e23b0702311a7c7bb23ebf6c51c30.zip |
Use Bun global
-rw-r--r-- | docs/api/http.md | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/docs/api/http.md b/docs/api/http.md index cd20a9931..3f476feb2 100644 --- a/docs/api/http.md +++ b/docs/api/http.md @@ -212,9 +212,7 @@ $ bun --hot server.ts To stream a file, return a `Response` object with a `BunFile` object as the body. ```ts -import { serve, file } from "bun"; - -serve({ +Bun.serve({ fetch(req) { return new Response(Bun.file("./hello.txt")); }, |