Update 2023-10-17: Node 21 has now shipped with WebSocket support as predicted, read more:
Now, let's talk about a recent pull request that's caught the eye over at the Undici project, which is Node’s own client for handling HTTP. This pull request is all about bringing WebSocket support to the table. It's like a beacon of hope for us, showcasing that, yeah, Node isn't going to let the modern web sprint ahead while it’s tying its shoelaces.
There’s an issue that popped up in the Node repo a while ago, which screams the community’s long-standing wish for some WebSocket magic. This thread is like a saga of devs dreaming about WebSockets dancing in Node natively.
So, what’s the big deal with WebSockets in Node? Well, it's not just about making real-time chit-chat easier; it's also about shipping Node with batteries included and gaining a small performance boost out of it. As Node version 21 is gearing up to see the daylight, having native WebSocket support could mean we get to build snazzier, more interactive apps.
Keep in mind Deno and Bun already comes with WebSocket support out of the box. Node should do to.
Read more about WebSocket at MDN.