Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Sep 30, 2021
1 parent abe0cbb commit 41b5a9c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions examples/ws/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ for await (const conn of server) {
(async () => {
const httpConn = Deno.serveHttp(conn);
for await (const requestEvent of httpConn) {
requestEvent.respondWith(respond(rpcMethods, requestEvent.request, {
proto: "ws",
enableInternalMethods: true,
publicErrorStack: true,
auth: {
key,
methods: ["login"],
jwt: requestEvent.request.headers.get("sec-websocket-protocol"),
},
}));
requestEvent.respondWith(
await respond(rpcMethods, requestEvent.request, {
proto: "ws",
enableInternalMethods: true,
publicErrorStack: true,
auth: {
key,
methods: ["login"],
jwt: requestEvent.request.headers.get("sec-websocket-protocol"),
},
}),
);
}
})();
}

0 comments on commit 41b5a9c

Please sign in to comment.