Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fastro/mod.ts>Handler

Full Stack Framework for Deno, TypeScript, Preact JS and Tailwind CSS
Go to Latest
type alias Handler
import { type Handler } from "https://deno.land/x/fastro@v0.84.23/mod.ts";

Handle http request

Example:

const handler = (req: Request, ctx: Context) => {
  return ctx.send("Hello")
}

definition: (req: HttpRequest, ctx: Context) =>
| string
| Promise<string>
| object
| Promise<object>
| bigint
| Promise<bigint>
| number
| Promise<number>
| boolean
| Promise<boolean>
| undefined
| Promise<undefined>
| Promise<Response>
| void
| Promise<void>
| Promise<Response | void>