Skip to main content
Module

x/pogo/main.ts>Server

Server framework for Deno
Go to Latest
class Server
Re-export
import { Server } from "https://deno.land/x/pogo@v0.5.2/main.ts";

A server represents your application and its ability to handle HTTP requests. Use pogo.server() to create a server instance.

Constructors

new
Server(options: ServerOptions)

Properties

options: ServerOptions
optional
raw: http.Server
router: Router

Methods

inject(rawRequest: http.ServerRequest): Promise<Response>
respond(request: http.ServerRequest)
route(
route: RoutesList,
handler?: RouteHandler,
): this
route(
route: RoutesListHasMethodAndPath,
options: RouteOptionsHasHandler | RouteHandler,
handler?: RouteHandler,
): this
route(
route: RoutesListHasHandlerAndMethod,
options: RouteOptionsHasPath,
handler?: RouteHandler,
): this
route(
route: RoutesListHasHandlerAndPath,
options: RouteOptionsHasMethod,
handler?: RouteHandler,
): this
route(
route: RoutesListHasHandler,
options: RouteOptionsHasMethodAndPath,
handler?: RouteHandler,
): this
route(
route: RoutesListHasPath,
options: RouteOptionsHasHandlerAndMethod,
handler?: RouteHandler,
): this
route(
route: RoutesListHasPath,
options: RouteOptionsHasMethod,
handler: RouteHandler,
): this
route(
route: RoutesListHasMethod,
options: RouteOptionsHasHandlerAndPath,
handler?: RouteHandler,
): this
route(
route: RoutesListHasMethod,
options: RouteOptionsHasPath,
handler: RouteHandler,
): this