-
I try to upgrade connection and promise return undefined import { Application, Router } from "https://deno.land/x/oak/mod.ts";
const router = new Router();
router.get("/gateway", async (ctx) => {
if(!ctx.isUpgradable) return ctx.response.body = "boomers opening websocket"
const socket = await ctx.upgrade();
console.log(socket)
})
const app = new Application();
app.use(router.routes());
app.use(router.allowedMethods());
await app.listen({ port: 8000 }); |
Beta Was this translation helpful? Give feedback.
Answered by
banocean
Sep 18, 2021
Replies: 1 comment
-
I forgot reload cache to update module ( |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
banocean
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I forgot reload cache to update module (
deno cache --reload=src/index.js
)