Sunday 31 May 2020

Good uWebSockets.js documentation/examples for migrating from socket.io?

Hey all,Does anyone have any good resources for working with uWebSockets, especially from migrating from express + socket.io to just uWebSockets?After doing a lot of research it's clear that socket.io is slow and bloated while uws is the clear king in performance. I'm trying to switch over but a lot of the provided documentation seems shallow and too technical, I can't even find a document with all the app parameters I can pass. In comparison socket.io which to be fair is definitely more user friendly, has very clear documentation about every inch of the api and how to do every basic example you could want. The examples uws provides seem to be high level examples for niche production-ready cases.It's kinda surprising because it is VERY clear that the author of uws staunchly hates socket.io and how un-optimized it is, but provides nearly no 'user-friendly' documentation or tutorials about how to get the same functionality out of uws. Only thing about getting the same functionality I could find was one measly medium article that the package author wrote that helped a little, but it definitely isn't enough.Anything helps, I've really looked through youtube and the internet but I can barely find anything useful which is blowing my mind for a package that claims 50 mil + downloads.​Thanks!​edit: for example, I can find bits and pieces of the websocket portion of the package, but I can't even find how to serve a html file on request yet the docs claim the api is the same as express but .sendFile isn't a function.

Submitted May 31, 2020 at 10:13PM by DivineActions

No comments:

Post a Comment