Skip to main content

Module relay

Module relay 

Source
Expand description

Whether a program’s pages talk to the relay — and so whether the backend serving them answers /_relay itself.

A page reaches the relay only through the server that served it: the browser dials /_relay on the page’s own origin. largo serve answers it; a deployed backend answered nothing, so every Publish, message handler and shared on store died the moment an app left development. The backend serving such pages now answers it from its own Serve: the interpreter for the pages its program declares, a compiled binary for the pages/ it embeds (logos_assets::USES_RELAY, from source_uses_the_relay).

Functions§

component_uses_the_relay
Whether one declared page, component or store talks to the relay (see pages_use_the_relay).
pages_use_the_relay
Whether any page, component or store this program declares talks to the relay: a ## Store … shared on, a When a message arrives on … handler, or a Publish … on … in any action or handler, at any depth.
source_uses_the_relay
pages_use_the_relay for a program’s source — a page file a site bundles. A source that does not parse uses nothing (its build refuses it on its own terms).