aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/http-stop.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/http-stop.ts b/examples/http-stop.ts
index f31dac616..a9ee90892 100644
--- a/examples/http-stop.ts
+++ b/examples/http-stop.ts
@@ -1,6 +1,8 @@
-const server = Bun.serve({
- fetch(req: Request) {
- return new Response(`Pending requests: ${this.pendingRequests}`);
+import { serve } from "bun";
+
+const server = serve({
+ fetch(req) {
+ return new Response(`Pending requests count: ${this.pendingRequests}`);
},
});