Aller au contenu

Handler Functions

Ce contenu n’est pas encore disponible dans votre langue.

Handler functions give you full programmatic control over a route response. You export async functions from a yrest.handlers.js file; yRest loads them at startup and calls the matching function when the route is hit. Unlike scenarios, handlers can run any logic — counters, state, conditional branching, external calls.