SheldonFromBBTS
Denoβ€’2y agoβ€’
17 replies
SheldonFromBBT

The new and updated version for using socket.io handler with Deno.serve()

Hey there! am getting a error when I pass socket.io handler to Deno.serve(),
Here is what am doing :
Deno.serve(io.handler(), { port: 3000, });

Additional code for refrence :
import { Server } from "https://deno.land/x/socket_io@0.2.0/mod.ts"; const io = new Server({ cors: { origin: [ "https://localhost:5173", ], credentials: true, methods: ["GET", "POST"], }, });
Was this page helpful?