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

x/alosaur/mod.ts>App

Alosaur - Deno web framework with many decorators
Go to Latest
class App
import { App } from "https://deno.land/x/alosaur@v0.30.0/mod.ts";

Constructors

new
App(settings: AppSettings)

Properties

private
optional
_globalErrorHandler: (ctx: Context<TState>, error: Error) => void
private
_routes: RouteMetadata[]
private
optional
_staticConfig: StaticFilesConfig
private
classes: ObjectKeyAny[]
private
readonly
metadata: MetadataArgsStorage<TState>
private
server: Server | undefined
private
viewRenderConfig: ViewRenderConfig | undefined
optional
_transformConfigMap: TransformConfigMap
readonly
globalErrorHandler: ((ctx: Context<TState>, error: Error) => void) | undefined
readonly
routes: RouteMetadata[]
readonly
staticConfig: StaticFilesConfig | undefined
readonly
transformConfigMap: TransformConfigMap | undefined

Methods

private
isRunFullServer(): boolean
private
sortMiddlewares(settings: AppSettings)
close(): void
error(globalErrorHandler: (ctx: Context<TState>, error: Error) => void): void

Create one global error handler

listen(address?: string | HTTPOptions): Promise<Server>
use(route: RegExp, middleware: IMiddleware<TState>): void
useCors(builder: CorsBuilder<TState>): void

Deprecate

useTransform(transform: TransformConfig): void