Skip to main content
Module

x/peko/mod.ts

Featherweight server framework and utility library for full-stack stateless apps on Deno Deploy 🐓🦕
Go to Latest
import * as peko from "https://deno.land/x/peko@v0.5/mod.ts";

Classes

Crypto class, generates hashes and signs and verifies JWTs using provided key.

Event emitter class, designed to be used with the sseHandler

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

Generates a caching middleware using provided ResponseCache instance

Logging middleware, awaits next() so logRequest happens after request is handled

Streams Event data from provided Emitter to Response body

Generates Response with SSRData.render result in body, sets modifiable "Cache-Control" header and hashes render output for "ETAG" header

Generates Response with body from file URL, sets modifiable "Cache-Control" header and hashes file contents for "ETAG" header.