Skip to main content
Module

x/fastro/examples/hello.ts

Fast and simple web application framework for deno
Go to Latest
File
import { Fastro } from "../mod.ts";
const server = new Fastro();
// add a router using route shorthand declarationserver.get("/", (req) => req.send("root"));
// add a router using `route` methodserver.route({ url: "/hello", method: "GET", handler: (req) => { req.send("hello"); },});
await server.listen({ port: 8000 });