Probun has a middleware system that allows you to run code before and after each route.
import type { Next } from 'probun'; const myMiddleware = async (req: Request, next: Next) => { console.log('My Middleware');};
import { Probun } from 'probun';import { myMiddleware } from './middleware'; Probun({ port: 3000, routes: 'routes', middleware: [myMiddleware],});