Skip to main content
Module

x/oak/mod.ts>Application#listen

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
method Application.prototype.listen
import { Application } from "https://deno.land/x/oak@v10.6.0/mod.ts";

Start listening for requests, processing registered middleware on each request. If the options .secure is undefined or false, the listening will be over HTTP. If the options .secure property is true, a .certFile and a .keyFile property need to be supplied and requests will be processed over HTTPS.

Parameters

addr: string

Returns

Promise<void>

Start listening for requests, processing registered middleware on each request. If the options .secure is undefined or false, the listening will be over HTTP. If the options .secure property is true, a .certFile and a .keyFile property need to be supplied and requests will be processed over HTTPS.

Omitting options will default to { port: 0 } which allows the operating system to select the port.

Parameters

optional
options: ListenOptions

Returns

Promise<void>