Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_api_server/src/services/route.ts>Route

API Server for deno for functional programmed endpoints
Latest
class Route
implements IRoute
import { Route } from "https://deno.land/x/deno_api_server@v0.6.4/src/services/route.ts";

Constructors

new
Route(method: string[] | string, uri: IMatcher | URLPattern | string)

Properties

protected
pipes: Function[]
readonly
matcher: IMatcher
readonly
methods: string[]
optional
parent: any
readonly
props: IStateMap

Methods

add route pipe

execute(
url: URL,
request: IRequest,
response: IResponse,
): Promise<IContext>

execute all pipes for current request

inject(
name: string,
service: any,
overridable?: boolean,
)

injection of service

isMatch(url: URL): boolean
prop(name: string, value: any)

route props