Skip to content

Commit

Permalink
chore(docs): lint bun and deno page (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbapapazes authored Apr 17, 2024
1 parent dc6359c commit de409c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions docs/3.adapters/bun.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import wsAdapter from "crossws/adapters/bun";

const { websocket, handleUpgrade } = wsAdapter(app.websocket);

const handler = toWebHandler(app)
const handler = toWebHandler(app);

const server = Bun.serve({
port: 3000,
Expand All @@ -59,8 +59,7 @@ const server = Bun.serve({
if (await handleUpgrade(req, server)) {
return;
}
return handler(req)
}
return handler(req);
},
});
```

8 changes: 4 additions & 4 deletions docs/3.adapters/deno.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ deployctl deploy --prod --exclude=node_modules --import-map=./import_map.json ./
```ts
import wsAdapter from "crossws/adapters/deno";

const handler = toWebHandler(app)
const handler = toWebHandler(app);

const { handleUpgrade } = wsAdapter(app.websocket);

Deno.serve(request => {
Deno.serve((request) => {
if (request.headers.get("upgrade") === "websocket") {
return handleUpgrade(request);
}
return handler(request)
})
return handler(request);
});
```

---
Expand Down

0 comments on commit de409c3

Please sign in to comment.