Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/composium/mod.ts>createRoute

Create handlers for Deno.serve. Powered by functional composition and the URL Pattern API.
Latest
function createRoute
Re-export
import { createRoute } from "https://deno.land/x/composium@v0.1.2/mod.ts";

A curried function which takes HTTP Methods, a URLPatternInput and Middlewares and returns in the end a composed route function.

createRoute("GET")({ pathname: "*" })(middleware)

Parameters

...methods: Method[]