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

Standard

Standalone library code, in the spirit of Deno’s or Go’s standard library. Standard imports only Core and is imported by Modules.

This is where the default implementations live: the chain handlers, the Middleware class, the resource group builder, the loggers, and the URLPattern polyfill.

Exports

ExportKindImport fromDocumented in
Handlerclassstandard/handlers/Handler.jsHandlers
RequestValidatorclassstandard/handlers/RequestValidator.jsHandlers
ResourcesIndexclassstandard/handlers/ResourcesIndex.jsHandlers
ResourceNotFoundHandlerclassstandard/handlers/ResourceNotFoundHandler.jsHandlers
RequestParamsParserclassstandard/handlers/RequestParamsParser.jsHandlers
ResourceCallerclassstandard/handlers/ResourceCaller.jsHandlers
AbstractSearchIndexclassstandard/handlers/AbstractSearchIndex.jsHandlers
AbstractChainBuilderclassstandard/chains/AbstractChainBuilder.jsAbstractChainBuilder
Middlewareclassstandard/http/Middleware.jsMiddleware
ResourceProxyclassstandard/http/ResourceProxy.jsMiddleware
ResourceGroupclassstandard/http/ResourceGroup.jsResource groups
Builderinterfacestandard/builders/Builder.jsBuilder
AbstractLoggerclassstandard/log/AbstractLogger.jsLoggers
ConsoleLoggerclassstandard/log/ConsoleLogger.jsLoggers
GroupConsoleLoggerclassstandard/log/GroupConsoleLogger.jsLoggers
Levelconststandard/log/Level.jsLoggers
Loggerinterfacestandard/log/Logger.jsLoggers
URLPatternPolyfillclassstandard/polyfill/URLPatternPolyfill.jsURLPattern
CustomUrlPatternclassstandard/polyfill/CustomURLPattern.jsURLPattern

Every path above is a subpath of @drashland/drash.

What You Actually Import

Almost nothing here, in a normal app. Middleware and ResourceGroup both reach you re-exported directly from the HTTP module, so import them from there rather than by the paths above.

The rest is here for the two cases where you go past the defaults: building a chain of your own out of Handler subclasses, and supplying your own URLPattern implementation.

Last updated on