Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/fw/service/deps.ts>oak.Application#addEventListener

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Go to Latest
method oak.Application.prototype.addEventListener
import { oak } from "https://deno.land/x/hex@0.6.3/src/fw/service/deps.ts";
const { Application } = oak;

Add an event listener for an "error" event which occurs when an un-caught error occurs when processing the middleware or during processing of the response.

Type Parameters

S extends AS

Parameters

type: "error"
listener: ApplicationErrorEventListenerOrEventListenerObject<S, AS> | null
optional
options: boolean | AddEventListenerOptions

Add an event listener for a "listen" event which occurs when the server has successfully opened but before any requests start being processed.

Parameters

type: "listen"
listener: ApplicationListenEventListenerOrEventListenerObject | null
optional
options: boolean | AddEventListenerOptions