Server
import { Server } from "https://raw.githubusercontent.com/gemrest/laurali/main/mod.ts";
The base Laurali server to be extended upon
abstract class Server { }
protected onError?(): void;
protected onListen?(): void;
protected onPostRoute?(ctx?: Deno.TlsConn): void;
protected onPreRoute?(ctx?: Deno.TlsConn): void;
addRoute(route: string, handler: () => any);
async listen();
static get port();
static get hostname();
§Constructors
§Methods
§
onError(): void protected optional
[src]The response delivered to a client when the Server
experiences any error
while evaluating the result of a route function, or if the Server
cannot
find a route function for a given path.
§
onPostRoute(ctx?: Deno.TlsConn): void protected optional
[src]Called after a connection to a client has concluded
§
onPreRoute(ctx?: Deno.TlsConn): void protected optional
[src]Called before a connection to a client has been responded to