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

x/fastro/docs/tsx.md

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

title: “TSX Page” description: How to setup a page with TSX image: https://fastro.deno.dev/fastro.png previous: static next: tsx-component

Create hello.tsx file:

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

const f = new fastro();

f.get(
    "/",
    (_req: HttpRequest, ctx: Context) => {
        return ctx.render(<h1>Hello, jsx!</h1>);
    },
);

await f.serve();