Skip to Content
Drash v3 is in beta. APIs may change.
ReferenceOverview

Reference

Drash is split into three codebases, and this reference follows that split. Imports flow one direction — Modules → Standard → Core — which is what keeps each layer independently useful. Framework covers the reasoning; these pages cover the API.

The Three Layers

LayerWhat it holdsImports
CoreTypes, interfaces, enums, HTTPError, and the base Resource. The lowest-level APIs.Nothing
StandardStandalone library code, in the spirit of Deno’s or Go’s standard library — handlers, middleware, loggers.Core
ModulesThe pieces that do the work: the HTTP module, the pre-built middleware, the builders.Standard, Core

Where to Start

Most applications only touch Modules. The two entry points — modules/http.native.js and modules/http.polyfill.js — re-export what you need from the layers below, so a normal app imports Application, Resource, Middleware, ResourceGroup, and HTTPError from one specifier.

If you want toRead
Build and run an HTTP applicationApplication
Write a resourceResource
Throw and catch errorsHTTPError
Attach middleware or prefixesResource groups
Use a pre-built middlewareCORS and its siblings
Add a step of your own to the chainHandlers
Supply your own URLPatternURLPattern

Looking for Something Else?

Last updated on