# HyperExpress: Node.js HTTP and WebSocket server built on uWebSockets.js

> HyperExpress is a Node.js HTTP and WebSocket server that replaces the built-in http module with uWebSockets.js, a Node.js binding of uSockets written in C++. Version 7.0.2 restricts deployment to Node.js 22, 24, or 26 and does not support Alpine Linux containers.

**kartikk221/hyper-express** — High performance Node.js webserver with a simple-to-use API powered by uWebsockets.js under the hood. 

- Repository: https://github.com/kartikk221/hyper-express
- Stars: 2,034 · Forks: 109
- Language: JavaScript
- License: MIT
- Published: 2026-10-11 · Updated: 2026-10-11 · Language: en
- Canonical page: https://hysenlabs.com/projects/kartikk221-hyper-express

## uWebSockets.js puts C++ networking below the Node.js JavaScript layer

Node.js's built-in http module processes requests in JavaScript with V8 overhead at every step. HyperExpress replaces that module with uWebSockets.js, a Node.js addon that wraps uSockets, a C++ event loop and networking library. The result is that HTTP parsing, connection handling, and WebSocket frames all go through compiled C++ code rather than the JavaScript runtime.

From an application code perspective, the difference is invisible. Routes, middleware, request objects, and response objects follow Express-style conventions. HyperExpress's stated motivation is to allow developers to get higher throughput from existing hardware without scaling instances. For the external benchmark reference, the project points to the web-frameworks-benchmark site for JavaScript server comparisons under real-world conditions.

HyperExpress v7 carries an MIT licence and was last pushed on 2026-07-27. The project also includes support for Server-Sent Events, multipart file uploading, modular routers, and multiple hostname/domain handling over SSL.

## npm i hyper-express installs a prebuilt native addon; Node.js 22, 24, or 26 required

Installing HyperExpress requires one command:

```bash
npm i hyper-express
```

The package.json engines field limits supported runtimes to `>=22 <23 || >=24 <25 || >=26 <27`, covering only the active even-numbered Node.js lines 22, 24, and 26. Node.js 18 and 20, which are still under LTS at many organizations, are outside this range and will trigger an npm engines mismatch.

The uWebSockets.js dependency installs prebuilt binaries for Tier 1 macOS and Windows platforms, and glibc-based Tier 1 Linux distributions. The package.json specifies it as `"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.69.0"`, a direct GitHub reference at version 20.69.0, not a standard npm registry package. This means the addon does not appear in npm audit results.

By default, the uWebSockets.js version header is stripped from HTTP responses. Setting the KEEP_UWS_HEADER environment variable to 1 or true before starting the process restores it.

## CommonJS-only delivery and the snake_case API that mirrors Express conventions

HyperExpress v7 is CommonJS-only and makes no provision for ESM imports. The project description states this explicitly: "HyperExpress remains CommonJS-only and preserves its existing snake_case API." Projects using ESM natively cannot require() it without a wrapper, and converting a package.json to type:commonjs just to accommodate HyperExpress affects the entire module graph.

The snake_case API surface covers Server, Router, Request, Response, Websocket, Middlewares, SSEventStream, MultipartField, and LiveDirectory components, each documented in a separate file under the docs/ directory. Routing follows the same verb-method pattern as Express: registering a handler for a path and HTTP method works through the same API shape.

A session engine for cookie-based sessions is published separately at kartikk221/hyper-express-session and is not bundled with the core package. The .gitmodules file visible in the repository root indicates at least one submodule dependency.

## Alpine Linux terminates the native addon with SIGSEGV: only glibc-based images work

Container deployments are where the platform constraint bites hardest. Alpine Linux uses musl libc instead of glibc. The uWebSockets.js native addon requires glibc, and the README states directly that plain Alpine and Alpine with gcompat are both unsupported because the addon can terminate with SIGSEGV.

SIGSEGV is a segmentation fault: the process crashes immediately with no error message, no stack trace, and no graceful shutdown. Debugging a container that dies this way without prior knowledge of this constraint wastes significant time. The recommended workaround for containerized deployments is to use a Debian or Ubuntu based Node.js image.

This constraint affects a common cost-reduction pattern. Many engineering teams use Alpine for smaller image sizes. Switching to Debian-based images increases uncompressed image size, typically by 50 MB or more, and affects build caching if an Alpine base was already in use across other services.

## Express.js middleware compatibility is partial, and gaps require polyfills or substitutes

HyperExpress describes itself as "mostly compatible with Express but not 100%". For teams migrating from Express.js or adopting HyperExpress alongside an existing Express ecosystem, some middleware packages will fail out of the box. The project acknowledges this directly and gives two options: write a polyfill for the missing behavior or drop the incompatible middleware.

No list of known incompatible packages is published in the README. The docs/Migration-v7.md document, referenced from the README, covers breaking changes introduced in 7.0.0 relative to v6, but it does not serve as a compatibility matrix against the Express ecosystem.

Most compatibility issues arise from middleware that reads from or writes to internal Express.js properties that do not exist on HyperExpress's Request and Response objects. HyperExpress exposes shared methods and properties, but internal fields specific to Express's implementation are not replicated.

## Express.js versus HyperExpress: same verb-method shape, different networking constraint

Express.js uses Node.js's built-in http and https modules. This means it runs on any Node.js version including LTS lines 18 and 20, works on Alpine Linux with no native addon involved, and supports any publish of an Express-compatible middleware package without compatibility gaps. ESM and CommonJS both work in an Express.js project, and a type field in package.json controls the default.

HyperExpress uses the same verb-method routing shape, so handler code needs no fundamental redesign. The difference shows up at the platform level: Node.js version constraint, Alpine incompatibility, and the CommonJS-only module format. A project that needs to run on Alpine, or whose team standardizes on a broader Node.js version range, cannot substitute HyperExpress for Express without addressing those constraints first.

For new projects with full control over the deployment environment and a need to extract more throughput from a given server, HyperExpress offers an Express-familiar API without requiring a different programming model. For projects already in production on Express, the migration cost depends on which middleware the service uses and whether any of it touches Express internals.

## Three test commands, a native lifecycle document, and a v6-to-v7 migration guide

Testing HyperExpress locally requires three separate commands after cloning and installing:

```bash
npm ci
npm test
npm run test:types
npm run test:load
```

npm test runs runtime tests using Node.js's built-in test runner with concurrency set to 1. npm run test:types runs TypeScript fixture checks with tsc --noEmit. npm run test:load runs a heavier stress gate covering HTTP, multipart, abort, WebSocket, and memory behavior. The types/index.d.ts file and tsconfig.json in the repository root indicate that TypeScript type definitions are maintained alongside the JavaScript source.

Two documents in docs/ address non-obvious operational concerns. docs/Native-Lifecycle.md covers the audited uWebSockets.js ownership, callback-memory, and option-range rules, which matter because calling the native addon incorrectly can crash the process. docs/Migration-v7.md covers breaking changes from v6 to v7. Anyone upgrading from 6.x should read that document before running npm install: v7.0.0 was published on 2026-07-15 and v7.0.2 on 2026-07-27.

## Conclusion

HyperExpress fits Node.js HTTP services where deployment is constrained to glibc-based Linux (Debian or Ubuntu based images), Node.js 22, 24, or 26, and a CommonJS module format. Avoid it for projects pinned to Node.js 18 or 20, any Alpine-based container, or codebases that rely on native ESM imports. Partial Express.js compatibility means any existing middleware that depends on internal Express.js mechanisms may need a polyfill or a replacement; audit the middleware list before migrating. The uWebSockets.js native addon installs from `"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.69.0"`, a GitHub source reference rather than the npm registry, so it bypasses npm registry vulnerability scanning. Read docs/Migration-v7.md before upgrading from v6: that document lists the breaking changes introduced in 7.0.0.

## FAQ

### What is HyperExpress?

HyperExpress is a Node.js HTTP and WebSocket server that uses uWebSockets.js, a C++ binding of uSockets, as its networking layer instead of Node.js's built-in http module. It exposes an Express-style API for routing and middleware.

### Does HyperExpress work on Alpine Linux?

No. Alpine Linux uses musl libc instead of glibc, and the uWebSockets.js native addon requires glibc. Running HyperExpress on Alpine or Alpine with gcompat can cause the process to terminate with SIGSEGV. Use Debian or Ubuntu based Node.js images instead.

### Is HyperExpress compatible with Express.js middleware?

Mostly but not completely. HyperExpress shares Express method signatures for common operations, but middleware that reads internal Express.js properties may fail. The project recommends writing a polyfill or dropping incompatible middleware.

### Which Node.js versions does HyperExpress support?

Version 7.0.2 supports Node.js 22, 24, and 26, as specified in the package.json engines field. Older LTS lines such as Node.js 18 and 20 are outside the supported range.

### Does HyperExpress support WebSocket connections?

Yes. HyperExpress includes WebSocket support through its Websocket component, documented in docs/Websocket.md. Server-Sent Events are also available through the SSEventStream component, documented in docs/SSEventStream.md.

## Sources

- [Issues](https://github.com/kartikk221/hyper-express/issues)
- [kartikk221/hyper-express on GitHub](https://github.com/kartikk221/hyper-express)
- [License: MIT](https://github.com/kartikk221/hyper-express/blob/master/LICENSE)
- [README](https://github.com/kartikk221/hyper-express/blob/master/README.md)
- [Releases](https://github.com/kartikk221/hyper-express/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/kartikk221-hyper-express
