@aurelle/zen
v0.0.2
Published
An immature, absolutely not production ready overlay on top of node's http module
Downloads
1
Readme
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();