Polka
An extremely minimal, highly performant Express.js alternative built on native Node HTTP.
Repository Health
Technical Analysis
Polka is a micro web framework that wraps Node’s native http.Server with routing, middleware, and sub-application support — while staying close enough to Express’s API that most Express middleware works unchanged. It extends the lukeed/trouter router for path matching, adding roughly 90 lines of code on top, and claims 33-50% faster throughput than Express for simple applications while keeping an almost identical route-definition and middleware API.
What You Get
- An Express-like chained API —
.use(),.get(),.post(), etc. — for defining middleware and routes - Compatibility with existing Express middleware in most common cases
- Sub-application support for mounting one Polka instance inside another
- A pluggable
options.serverso Polka can attach to an already-created http.Server - A minimal dependency footprint built directly on trouter (routing) and @polka/url (URL parsing)
Common Use Cases
- Building lightweight REST APIs or microservices where Express’s overhead isn’t worth the cost
- Migrating a small Express app to a lower-overhead server without rewriting routing/middleware logic
- Serving as the HTTP layer inside performance-sensitive Node.js services
- Prototyping quick HTTP servers with familiar Express-style route definitions
Under The Hood
Architecture Polka is structured as a Lerna-managed monorepo with the core polka package (packages/polka/index.js, ~100 lines) wrapping Node’s http.Server, delegating path matching to the separately-published trouter router and query parsing to @polka/url, with send/send-type as sibling helper packages. Tech Stack It’s plain, dependency-light CommonJS JavaScript with no build step, tested with tape/tap-spec, and requires only trouter and @polka/url as runtime dependencies. Code Quality The codebase is intentionally tiny and readable, covered by a tape-based test suite with Codecov tracking, though the project has seen little recent commit activity despite continued high download volume. API Design Polka deliberately mirrors Express’s .use()/.get()/.listen() conventions so existing Express knowledge and much of its middleware ecosystem transfer directly, minimizing the learning curve for teams switching over.
Used by 2 apps in this directory
Abby
Developer Tools · Product Management
Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.
Rocket.Chat
Team Chat
The secure, self-hosted team communications platform for organizations that cannot compromise on data sovereignty.