Skip to main content

bundle_routes

Function bundle_routes 

Source
pub fn bundle_routes<S>(client: Arc<ClientAssets>) -> Router<S>
where S: Clone + Send + Sync + 'static,
Expand description

The two routes that answer the client bundle: / and every path below it that no other route of the same table claims.

The city’s own port and the remote listener (bin::outside) serve the page through this one table, so a device that opens the remote address gets the same bytes, under the same headers, as a browser on this machine (crates/wire/Spec.lean §8-2). The routes take no pairing token: a browser has to load the page before it has anywhere to type the code.