Skip to main content
Module

x/dactyl/Application.ts>Application

Web framework for Deno, built on top of Oak 🦇
Latest
class Application
import { Application } from "https://deno.land/x/dactyl@v0.1.0-alpha/Application.ts";

Bootstrap class responsible for registering controllers onto Router, and starting the Oak webserver

Constructors

new
Application(appConfig: ApplicationConfig)

Properties

private
app: OakApplication
private
router: Router

Methods

private
cors(context: Context, next: Function): Promise<void>

CORS middleware, will be enabled in constructor if appConfig.cors is true

private
handleNotFound(context: Context): Promise<void>

404 middleware, enabled by default and not disableable

private
logger(context: Context, next: Function): Promise<void>

Logger middleware, will be enabled in constructor if appConfig.log is true

private
timing(context: Context, next: Function): Promise<void>

Timing middleware, will be enabled in constructor if appConfig.timing is true

run(port: number): Promise<void>

Function responsible for begin listen of oak webserver. Console notified when webserver begins.

The webserver will start on port port as provided as an argument.