Skip to main content
Module

x/fastro/examples/middleware.ts

Fast and simple web application framework for deno
Go to Latest
File
import fastro, { HttpRequest, HttpResponse, Next } from "../server/mod.ts";
const f = fastro();
f.use(( _req: HttpRequest, _res: HttpResponse, next: Next,) => { new Date(); next();});
f.get("/", ( _req: HttpRequest, _res: HttpResponse, next: Next,) => { new Date(); next();}, () => "Hello world");
await f.serve();