Module

x/drash/src/standard/http/ResourceGroup.ts>Builder

A microframework for building JavaScript HTTP applications. Runtime-agnostic. Strongly typed.
Latest
class Builder
implements IBuilder
import { Builder } from "https://dotland.deno.dev/x/drash@v3.0.0-beta.2/src/standard/http/ResourceGroup.ts";

Builder for building a resource group. Resources in a resource group can share the following:

  • Middleware
  • Path prefixes

Methods

build(): Resource[]

Build the resource group.

middleware(...middleware: Middleware[]): this

Set the middlware for all resources in this group.

pathPrefixes(...pathPrefixes: string[]): this

Set the path prefixes for all resources in this group.

resources(...resources: ResourceClasses): this

Set the resources for this group so they can share functionality.