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

x/alosaur/src/decorator/Controller.ts>Controller

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
function Controller
import { Controller } from "https://deno.land/x/alosaur@v0.31.1/src/decorator/Controller.ts";

Defines a class as a controller. Each decorated controller method is served as a controller action. Controller actions are executed when request come.

Parameters

optional
baseRoute: string

Extra path you can apply as a base route to all controller actions

optional
providers: ProviderDeclaration[]

Providers is declare in controller

Returns

Function