x/pogo@v0.5.2/main.ts

Server framework for Deno
Latest
import * as pogo from "https://deno.land/x/pogo@v0.5.2/main.ts";

Classes

A request represents an incoming message that your server should respond to. Pogo passes a request instance as the first argument to route handlers.

A response represents an outgoing message that will be returned by your server for a corresponding request. Use h.response() to create a response instance.

A router represents a collection of routes and determines which route will handle a given HTTP request. Use pogo.router() to create a router instance.

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

A response toolkit contains various utility methods for creating responses. Pogo passes a toolkit instance as the second argument to route handlers.

Variables

Returns a route handler function that serves the specified directory using h.directory()

Returns a route handler function that serves the specified file using h.file()

Returns a new instance of the Router class

Returns a new instance of the Server class