Replies: 2 comments
-
Hi! Bun can be used with the classic |
Beta Was this translation helpful? Give feedback.
0 replies
-
Well I need to use it along with Hono server instance. So I tried const app = new Hono();
const io = new Server({
cors: {
origin: clienturl,
methods: ["GET", "POST"],
credentials: true
}
});
const handler = io.handler(async (req: Request) => {
//upgrade to websocket
return await app.fetch(req) || new Response(null, { status: 404 });
});
serve(handler, { port: port }); Now, because Bun uses npm packages and that npm version of socket.io server has no hander() method I am not able to use it on the go. I tried to make a wrapper but I messed up. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Binding with External frameworks doesn't work as there is no io.handler() method.
Beta Was this translation helpful? Give feedback.
All reactions