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

x/fastro/docs/hello-context.md

Full Stack Framework for Deno, TypeScript, Preact JS and Tailwind CSS
Latest
File

title: “Hello World Using Context” description: The application for creating a simple route using application context image: https://fastro.deno.dev/fastro.png previous: hello next: json

import fastro, { Context, HttpRequest } from "https://fastro.deno.dev/mod.ts";

const f = new fastro();

f.get(
    "/",
    (_req: HttpRequest, ctx: Context) => {
        return ctx.send("Helo world", 200);
    },
);

await f.serve();