aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-04-11 05:59:39 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-04-11 05:59:39 -0700
commit9884a5fe14736c5145b3e3b2637e4e82db50b16d (patch)
treef832217769759defbcdb26643037cf640a7592b6
parent55ff561429565509d2c92071f5561c81599ae37b (diff)
downloadbun-9884a5fe14736c5145b3e3b2637e4e82db50b16d.tar.gz
bun-9884a5fe14736c5145b3e3b2637e4e82db50b16d.tar.zst
bun-9884a5fe14736c5145b3e3b2637e4e82db50b16d.zip
Update http-stop.ts
-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}`);
},
});