0.0.2 • Published 9 months ago

@aurelle/zen v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Zen

An immature, absolutely not production ready overlay on top of node's http module.

Minimalistic and "low latency" express-like http framework.

Use at your (very) own risk.

Built for my own internal projects.

Starter

Incomplete starter but still highlights basic usage.

import { Server } from "zen"; 

export const main = async () => {
	const zen = new Server();

	zen.beforeEach((req, res) => {
		console.log('Before each handler');
	});

	zen.get('/', (req, res) => {
		return {
			message: 'Hello world',
		}
	});

	zen.get('/echo-request', (req, res) => {
		return req;
	});

	zen.listen(3000)
}

main();
0.0.2

9 months ago

0.0.1

9 months ago

0.0.0

9 months ago