Skip to main content
Module

x/fastro/mod.ts>ModuleFunction

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

Groups the handler, service, page, and layout

Example:

import fastro from "https://fastro.deno.dev/mod.ts";

const f = new fastro();

const helloModule = (f: Fastro) => {
  return f.get("/", () => "Hello World");
};

await f.group(helloModule);

await f.serve();
definition: (f: Fastro) => Fastro | Promise<Fastro>