Skip to main content
Module

x/peko/mod.ts

Featherweight app toolkit for Deno Deploy 🐣⚡
Go to Latest
import * as peko from "https://deno.land/x/peko@1.7.3/mod.ts";

Classes

Utility class for running middleware functions as a cascade

Crypto class, generates hashes and signs and verifies JWTs using CyptoKey (generated from string or provided).

Response caching class, provides memoize method to be used on handlers or next() in middleware

Variables

Auth middleware, uses Crypto utility class to verify JWTs

Cache and serve responses using provided ResponseCache

Generic request info logging middleware. Awaits next() so log happens post request handling.

Streams "data" events from provided EventTarget to Response body. Call Response.body.cancel() to end.

Generates Response with SSRData.render result in body Sets headers "Content-Type" and "ETag" to "text/html" and bodyHash

Generates Response body from file URL and Content-Type and ETAG headers. Optionally: provide custom headers and/or body transform fcn.