aboutsummaryrefslogtreecommitdiff
path: root/examples/http-file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'examples/http-file.ts')
-rw-r--r--examples/http-file.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/http-file.ts b/examples/http-file.ts
index f2c0773e8..3c1d67169 100644
--- a/examples/http-file.ts
+++ b/examples/http-file.ts
@@ -1,9 +1,7 @@
// Start a fast HTTP server from a function
Bun.serve({
fetch(req) {
- const url = new URL(req.url.substring(1), "file://" + import.meta.path);
- const path = Bun.resolveSync(url.pathname, import.meta.path);
- return new Response(Bun.file(path));
+ return new Response("Hello World!");
},
// this is called when fetch() throws or rejects
tocol/src/util/preview.ts?h=dylan/github-api-option&id=0965e6ddfd48b2e0e44c2efce7d9fc24115ef63e&follow=1'>Fix array variables preview in debugger (#6379)Gravatar 2hu 1-1/+4 2023-10-07feat(KeyObject) (#5940)Gravatar Ciro Spaciari 106-67/+9342 2023-10-07Exclude more filesGravatar Jarred Sumner 1-1/+1 2023-10-07Exclude more filesGravatar Jarred Sumner 1-1/+2 2023-10-07Update settings.jsonGravatar Jarred Sumner 1-1/+2 2023-10-07Update settings.jsonGravatar Jarred Sumner 1-2/+3 2023-10-06fix a couple install testsGravatar Dylan Conway 1-8/+8 2023-10-06formatGravatar Dylan Conway 1-1/+2 2023-10-06Fix memory leak in fetch() (#6350)Gravatar Jarred Sumner 1-2/+0 2023-10-06[types] allow onLoad plugin callbacks to return undefined (#6346)Gravatar Silver 1-1/+1 2023-10-06docs: `file.stream()` is not a promise (#6337)Gravatar Paul Nodet 1-1/+1