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

Examples

Each of these is a complete, runnable application. They live in the examples directory of the repository, so you can clone the repo and run any of them directly.

They all do the same thing — answer GET / from a single Home resource — so you can compare what changes between runtimes and what does not.

Each runtime is a section in the sidebar, and each page under it is one flavor of that example.

What Changes Between Them

Entry pointWhat the resource receives
Bunhttp.polyfill.jsWeb Request
Cloudflare Workershttp.native.jsWeb Request
Denohttp.native.jsWeb Request
Node (ESM / CJS / TS)http.polyfill.jsContext object you build

The resource and the chain are identical in every one. What differs is the entry point — see Native vs. Polyfill — and how your runtime hands you a request.

Every example catches favicon requests in its .catch(). Browsers request /favicon.ico automatically, and no resource owns that path, so the chain throws a 404 for it. That check keeps the noise out of the console; it is not something your own app needs.

Looking for a Walkthrough Instead?

These pages show finished apps. If you want the reasoning built up step by step, read the step-by-step guide.

Last updated on