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
| Export | Kind | Import from | Documented in |
|---|---|---|---|
Handler | class | standard/handlers/Handler.js | Handlers |
RequestValidator | class | standard/handlers/RequestValidator.js | Handlers |
ResourcesIndex | class | standard/handlers/ResourcesIndex.js | Handlers |
ResourceNotFoundHandler | class | standard/handlers/ResourceNotFoundHandler.js | Handlers |
RequestParamsParser | class | standard/handlers/RequestParamsParser.js | Handlers |
ResourceCaller | class | standard/handlers/ResourceCaller.js | Handlers |
AbstractSearchIndex | class | standard/handlers/AbstractSearchIndex.js | Handlers |
AbstractChainBuilder | class | standard/chains/AbstractChainBuilder.js | AbstractChainBuilder |
Middleware | class | standard/http/Middleware.js | Middleware |
ResourceProxy | class | standard/http/ResourceProxy.js | Middleware |
ResourceGroup | class | standard/http/ResourceGroup.js | Resource groups |
Builder | interface | standard/builders/Builder.js | Builder |
AbstractLogger | class | standard/log/AbstractLogger.js | Loggers |
ConsoleLogger | class | standard/log/ConsoleLogger.js | Loggers |
GroupConsoleLogger | class | standard/log/GroupConsoleLogger.js | Loggers |
Level | const | standard/log/Level.js | Loggers |
Logger | interface | standard/log/Logger.js | Loggers |
URLPatternPolyfill | class | standard/polyfill/URLPatternPolyfill.js | URLPattern |
CustomUrlPattern | class | standard/polyfill/CustomURLPattern.js | URLPattern |
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