Zero dependencies. V8-optimized internals. Express-like API.
Nextpress outperforms raw http.createServer through
engine-level optimizations that shouldn't be possible.
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);
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.
123,296 req/s vs 116,950 for raw http.createServer. V8 prototype patching creates more optimizable code than vanilla Node.js.
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.
Written in TypeScript with full type definitions. ESM-only with NodeNext resolution. No @types packages needed.
O(1) static route lookup via Map + radix tree for parameterized routes. Supports wildcards, route groups, and automatic HEAD→GET fallback.
JSON body parser, CORS middleware, and static file serving built-in. Directory traversal protection. No external middleware needed for basics.
If you know Express, you know Nextpress. Same req/res/next pattern, same method shortcuts, same middleware model.
Tested with autocannon - 100 concurrent connections, 10-second duration,
10 pipelined requests. Same hardware, same response, same conditions.
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.
npm install nextpressjs
{
"type": "module"
}
import { createServer } from 'nextpressjs'; const app = createServer(); app.get('/', (req, res) => { res.json({ message: 'Hello!' }); }); app.listen(3000, () => { console.log('Running on :3000'); });
node server.js
| 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 |
Drop-in replacement for Express with 1.8× the performance. Read the docs, check the whitepaper, or dive straight into the code.