rally/generator/ssr_handler

SSR handler codegen.

Generates ssr_handler.gleam: takes a parsed Route, calls the page’s load function, renders view wrapped in layout, embeds the model as base64 flags for client hydration. Handles auth resolve, from_session, authorize, and LoadResult (Page/Redirect with cookies) when auth is configured.

Values

pub fn generate(
  page_contracts page_contracts: List(
    #(types.ScannedRoute, types.PageContract),
  ),
  has_client_context has_client_context: Bool,
  has_from_session has_from_session: Bool,
  from_session_module from_session_module: String,
  router_module router_module: String,
  shell_html shell_html: String,
  atoms_module atoms_module: String,
  wire_module wire_module: option.Option(String),
  client_context_module client_context_module: option.Option(
    String,
  ),
  auth_config auth_config: option.Option(types.AuthConfig),
  wire_import_module wire_import_module: String,
  protocol protocol: String,
) -> String
Search Document