From 631c8268665e23b0702311a7c7bb23ebf6c51c30 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Wed, 13 Sep 2023 20:52:43 -0700 Subject: Use Bun global --- docs/api/http.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'docs/api') 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")); }, -- cgit v1.2.3