@jsango/middleware
v1.3.0
Published
Middleware abstractions and middleware pipeline for jsango
Readme
@jsango/middleware
Onion-style middleware pipeline, response normalization, global error boundaries, and Application coordinator.
Part of the jsango backend framework for TypeScript.
Installation
pnpm add @jsango/middlewareUsage
import { Application } from '@jsango/middleware';
const app = new Application();
app.use(async (ctx, next) => {
console.log(`${ctx.request.method} ${ctx.request.url.pathname}`);
return next();
});
app.get('/hello', () => ({ message: 'world' }));Documentation
For full architecture documentation and guides, visit the jsango documentation.
License
MIT © jsango contributors
