Skip to main content
Module

x/allo_controllers/mod.ts>Controller

🦕 Simple "convention over configuration" Controllers solution for Deno.
Go to Latest
class Controller
implements IController
extends EventTarget
Abstract
import { Controller } from "https://deno.land/x/allo_controllers@v1.1.2/mod.ts";

Constructors

new
Controller(
request: Request,
action: string,
params: Record<string, string>,
)

Methods

afterRender(): void
beforeRender(): void
getView(): string
redirectUrl(url: string): void
sendDownloadFile(file: string | File | Deno.FsFile, downloadName: string): void
sendFile(file: string | File | Deno.FsFile): void
sendJson(data: unknown, prettyPrint?): void
sendResponse(response: Response | Promise<Response>): void
sendText(text: string): void
setView(view: string): void
shutdown(): void
startup(): void