diff options
Diffstat (limited to 'examples/http-file.ts')
-rw-r--r-- | examples/http-file.ts | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/http-file.ts b/examples/http-file.ts index 4eaa03212..2789f09a1 100644 --- a/examples/http-file.ts +++ b/examples/http-file.ts @@ -2,11 +2,7 @@ const { serve, file, resolveSync } = Bun; const { path } = import.meta; serve({ fetch(req: Request) { - const modulePath = resolveSync( - new URL(req.url).pathname.substring(1), - path - ); - return new Response(file(modulePath)); + return new Response(file(new URL(req.url).pathname.substring(1))); }, // this is called when fetch() throws or rejects |