Zero-dependency Express-like server
Zero-dependency

Small, Express-like API without external deps.

Pluggable parsers

json(), urlencoded(), text(), raw() built-in.

Streaming uploads

Multipart streaming to disk for large files.

Static serving

Correct Content-Type handling and caching options.

Built-in fetch

Small server-side fetch replacement for HTTP requests.

1
Registration order

Routing and middleware run in the order they're registered—add parsers before handlers.

2
Body parsing

Body parsers populate req.body; multipart uploads expose req.body.files and req.body.fields.

3
Handler model

Handlers receive req and res. Use res.json() or res.send() to respond.

4
Static middleware

Serves files with Content-Type derived from extension and supports caching options.

Quickstart

Install from npm and create a simple server:

npm install zero-http
const { createApp, json, static } = require('zero-http')
const path = require('path')
const app = createApp()

app.use(json({ limit: '10kb' }))
app.use(static(path.join(__dirname, 'public'), { index: 'index.html' }))

app.get('/ping', (req, res) => res.json({ pong: true }))

app.listen(3000, () => {
	console.log('Server listening on http://localhost:3000')
})

To run this demo server from the repo root and open http://localhost:3000.

npm install zero-http
npm run docs
# open http://localhost:3000

API, Options & Examples

Comprehensive reference for configuration options, runtime behavior, and API examples. Expand each section for details and runnable snippets.
Options (middleware & parser settings)

Common option shapes and defaults for parsers and upload middleware.

Loading options…
API Reference
Loading API reference…
Simple Examples

Snippets showing how to compose middleware for common tasks.

Loading examples…
Installation & tests
#clone and install dependencies
git clone https://github.com/tonywied17/zero-http-npm.git
npm install

# run demo server from repo root
npm run docs

# or directly:
node documentation/full-server.js

# run tests (project-specific)
node test/test.js

Extending

Use the provided middlewares and routing helpers to build controllers, add auth, or swap in different storage backends. The multipart parser exposes file streams and writes each part to disk so you can replace disk writes with S3 streams if desired.

Playground

Interactive tools to test uploads, body parsers, and the built-in proxy.

Upload multipart data

Drag, drop or pick a file
Drop files here or
Page 1

Uploaded Files

Thumbnails and metadata
(loading...)

Trash

(loading...)

Quick parser tests


				

Proxy Test


				

This demo doubles as a readable API reference and playground — try uploading files, inspect the returned JSON, and use the playground to test parsers.