Skip to main content
Module

x/pogo/main.ts>Server

Server framework for Deno
Latest
class Server
Re-export
import { Server } from "https://deno.land/x/pogo@v0.6.0/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
raw: http.Server
router: Router
url: URL

Methods

inject(request: Request | string | URL): Promise<Response>
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