-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deno support #3600
Comments
Any news about this feature? |
Does anybody know what is needed for supporting deno? |
Deno for client uses the web WebSocket API, whereas for server you could look at how it is done in https://deno.land/[email protected]/ws/mod.ts |
Any update, does socket.io works with deno? |
You ca try to use: http://esm.sh/socketio but I had a talk in the discord chan of deno and it seems that the node modules needs to be converted. I also wanted to use ws with deno but they don't have support for a socks proxy. So trying the package that I mentioned, wait for official support or helping by make the underlying network stuff of node compatible :). Also if you haven't tried it yet: https://stackoverflow.com/questions/61821038/how-to-use-npm-module-in-deno/61821141#61821141 |
There's a pretty good tool called Plan of attack would be:
Would be awesome to have Deno support! |
As a simpler alternative to the above mentioned solution, there is the official (experimental!) deno tool If socket.io mantainers want to do this and want help to port socket.io to deno, feel free to contact me, i'd gladly help out. |
What i forgot to mention above with my comment: that isnt a perfect solution. Deno does provide a |
I have tried In contrast, deno2node is literally meant to replace But either way, I do agree that the compat mode would probably work, too, and it may be the easiest of all suggested solutions. Although it will of course not be as nice as having native Deno support. |
Hello everyone! I'm happy to announce that we have published a Socket.IO server implementation for Deno 🚀 Usage: import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { Server } from "https://deno.land/x/[email protected]/mod.ts";
const io = new Server();
io.on("connection", (socket) => {
console.log(`socket ${socket.id} connected`);
socket.emit("hello", "world");
socket.on("disconnect", (reason) => {
console.log(`socket ${socket.id} disconnected due to ${reason}`);
});
});
await serve(io.handler(), {
port: 3000,
}); Link: https://deno.land/x/[email protected] Feedback is welcome! |
Welcome to the future, Socket.io devs. I just can't wait to stop finding Node examples online forever. |
will there be official support for https://deno.land?
The text was updated successfully, but these errors were encountered: