Skip to main content
Module

x/fastro/examples/plugin.ts

Fast and simple web application framework for deno
Go to Latest
File
import { Fastro } from "../mod.ts";const server = new Fastro();
const plugin = function (fastro: Fastro, done: Function) { fastro .get("/", (req) => req.send("get")) .post("/", (req) => req.send("post")) .put("/", (req) => req.send("put")) .delete("/", (req) => req.send("delete")); done();};
server .register(plugin) .register("v1", plugin) .register("v2", plugin);
await server.listen();