Docs Examples Whitepaper GitHub
v1.0 - Production Ready

The fastest HTTP
framework for Node.js

Zero dependencies. V8-optimized internals. Express-like API. Nextpress outperforms raw http.createServer through engine-level optimizations that shouldn't be possible.

123,296
Requests / second
1.8×
Faster than Express
0
Dependencies
server.js
import { createServer, jsonParser, cors } from 'nextpressjs';

const app = createServer();

app.use(cors());
app.use(jsonParser());

app.get('/', (req, res) => {
  res.json({ hello: 'world' });
});

app.get('/users/:id', (req, res) => {
  res.json({ id: req.params.id });
});

app.group('/api', (api) => {
  api.get('/health', (req, res) => {
    res.json({ status: 'ok' });
  });
});

app.listen(3000);
$ npm install nextpressjs

Performance that shouldn't be possible

Most frameworks add overhead on top of Node.js. Nextpress uses V8 engine internals - prototype patching, hidden class stabilization, and monomorphic inline caches - to actually make Node.js faster than vanilla code.

Faster Than Raw HTTP

123,296 req/s vs 116,950 for raw http.createServer. V8 prototype patching creates more optimizable code than vanilla Node.js.

Zero Dependencies

Built entirely on Node.js built-in modules. No supply chain risk, no version conflicts, no bloat. Just node:http, node:fs, and node:path.

TypeScript Native

Written in TypeScript with full type definitions. ESM-only with NodeNext resolution. No @types packages needed.

Radix Tree Router

O(1) static route lookup via Map + radix tree for parameterized routes. Supports wildcards, route groups, and automatic HEAD→GET fallback.

Batteries Included

JSON body parser, CORS middleware, and static file serving built-in. Directory traversal protection. No external middleware needed for basics.

Express-like API

If you know Express, you know Nextpress. Same req/res/next pattern, same method shortcuts, same middleware model.

Benchmarked against every alternative

Tested with autocannon - 100 concurrent connections, 10-second duration, 10 pipelined requests. Same hardware, same response, same conditions.

⚡ Nextpress 123,296 req/s
105.4%
🟦 Raw http.createServer 116,950 req/s
100%
🟧 Fastify 116,180 req/s
99.3%
⬜ Express 5.x 70,148 req/s
60%

Why is it faster than raw HTTP?

When Nextpress patches IncomingMessage.prototype at module load, V8's JIT compiler sees a stable object shape for every request. This triggers monomorphic inline caches - property access becomes a single memory offset read instead of a hash table lookup.

  • Prototype patching Stable V8 hidden classes
  • Frozen singletons Zero allocation on static routes
  • fastByteLength Skips Buffer.byteLength for ASCII
  • writeHead() Single syscall for all headers
  • Radix tree O(1) Map for static routes

Up and running in 60 seconds

1. Install

bash
npm install nextpressjs

2. Configure package.json

json
{
  "type": "module"
}

3. Create server

javascript
import { createServer } from 'nextpressjs';

const app = createServer();

app.get('/', (req, res) => {
  res.json({ message: 'Hello!' });
});

app.listen(3000, () => {
  console.log('Running on :3000');
});

4. Run

bash
node server.js

How Nextpress compares

Feature Nextpress Express Fastify Koa
Performance (req/s) 123,296 70,148 116,180 ~80,000
Dependencies 0 ~31 ~14 ~24
TypeScript Native @types Built-in @types
Module System ESM CJS + ESM CJS + ESM CJS
Router Radix + Map Regex Radix (find-my-way) Regex
JSON Parser Built-in body-parser Built-in koa-bodyparser
CORS Built-in cors package @fastify/cors @koa/cors
Static Files Built-in serve-static @fastify/static koa-static

Ready to build something fast?

Drop-in replacement for Express with 1.8× the performance. Read the docs, check the whitepaper, or dive straight into the code.

Read the Docs Read the Whitepaper