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

x/oak_nest/mod.ts>Application#addEventListener

Refer to nestjs to realize some common functions for Deno
Go to Latest
method Application.prototype.addEventListener
import { Application } from "https://deno.land/x/oak_nest@v1.14.0/mod.ts";

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