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

x/fastro/mod.ts>ModuleFunction

Full Stack Framework for Deno, TypeScript, Preact JS and Tailwind CSS
Go to Latest
type alias ModuleFunction
import { type ModuleFunction } from "https://deno.land/x/fastro@v0.93.2/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>