Skip to main content
Module

x/denote/deps.ts>sift

A minimal profile page generator for Deno Deploy
Latest
function sift
import { sift } from "https://deno.land/x/denote@0.2.1/deps.ts";

serve() registers "fetch" event listener and invokes the provided route handler for the route with the request as first argument and processed path params as the second.

Examples

Example 1

serve({
 "/": (request: Request) => new Response("Hello World!"),
 404: (request: Request) => new Response("not found")
})

The route handler declared for 404 will be used to serve all requests that do not have a route handler declared.

Parameters

userRoutes: Routes