Examples
Complete apps for common tasks. Each page shows the full app.ts, which a test runs, and how to try it with curl.
REST API
CRUD routes over an in-memory store, JSON bodies via @routup/body, 404 for unknown ids.
Auth Middleware
Bearer token check, the user handed on through event.store, 401 otherwise.
JSON Errors
One error handler that answers every thrown error with a JSON body and its status.
Server-Sent Events
Three events streamed with createEventStream, then the stream closes.
Modular Apps
One App per resource, mounted on a root App under a path prefix.
Static Files
A single-page app served with @routup/assets, index.html as fallback, /api left to the routes.
Express Middleware
A Node.js (req, res, next) middleware wrapped with fromNodeMiddleware.
Cloudflare Workers
The app as a module worker, with its wrangler.jsonc.