Skip to content
On this page


Common Constructs


Handler functions that are called when a request is made to an endpoint. At least one entrypoint handler is required to handle incoming requests in a project using serve(handler). Handlers receive a Request object and must return a Response object, or a Promise resolving to a Response object (if async).


Ordinary functions that can be called from other functions, modules, services, or data. Ideally, functions should only perform a single task, and should be named accordingly. Functions receive all arguments required to perform their task, and can optionally return data or a Promise resolving to data (if async).

JSX/TSX Components

Special functions that return JSX/TSX code. They can be imported into other modules and used to build User Interfaces. Components receive all properties (props) required to render their JSX/TSX code, and return the (unrendered) JSX/TSX code or a Promise resolving to the JSX/TSX code (if async).

Code has loaded