Repository
Current version released
4 years ago
Dependencies
deno.land/x
skypack.dev
preact-render-to-string@v5.1.12
std
Sift
Sift is a routing and utility library for Deno Deploy.
Usage
serve()
serve accepts an object literal that where the keys are routes in path
import { serve } from "https://deno.land/x/sift/mod.ts";
serve({
"/": () => new Response("hello world"),
"/blog/:slug": (request, { slug }) => {
const post = `Hello, you visited ${slug}!`;
return new Response(post);
},
404: () => new Response("not found")
});