Work in progress, will be updated.
PermalinkOverview
uWebSockets.js is an HTTP & WebSocket Server module.
PermalinkPrerequisites
- Understanding of HTTP
- Understanding of HTTP statuses (200, 4xx, 5xx)
- Understanding of HTTP headers
- Understanding of HTTP requests and responses
- Understanding of WebSockets
PermalinkUse Cases
- Creating an HTTP Server (request-response communication)
- Creating an HTTP WebSocket Server (bi-directional communication)
- Serving web pages
- Serving web sessions
- Serving REST APIs
PermalinkSupported Environments
- Node.js
PermalinkWhy uWebSockets.js
- Faster than Node.js built-in HTTP module. uWebSockets.js uses the uWebSockets module written in C++.
- Faster than Express.js, Fastify.js, Koa.js, and Hapi.js (existing Web Framework modules that use the Node.js built-in HTTP module).
- Faster than Socket.IO and WS (existing WebSocket modules that use the Node.js built-in HTTP module).
- Standards compliant, with perfect Autobahn|Testsuite score since 2016.
- Battle-tested, used by cryptocurrency exchanges around the world.
- Comes with documentation, TypeScript types, and examples.
- More information here: github.com/uNetworking/uWebSockets.js
PermalinkInstallation
npm install github:uNetworking/uWebSockets.js#v20.10.0
PermalinkUsage
TODO
- More examples here: github.com/uNetworking/uWebSockets.js/tree/..
PermalinkReferences (what else can i read more)
Subscribe to our newsletter
Read articles from jxyz directly inside your inbox. Subscribe to the newsletter, and don't miss out.