View Source Hologram.Controller (hologram v0.2.0)

Summary

Functions

Extracts param values from the given URL path corresponding to the route of the given page module.

Handles the page request by building HTML response body and halting the Plug pipeline.

Functions

extract_params(url_path, page_module)

@spec extract_params(String.t(), module()) :: %{required(atom()) => any()}

Extracts param values from the given URL path corresponding to the route of the given page module.

handle_request(conn, page_module)

@spec handle_request(Plug.Conn.t(), module()) :: Plug.Conn.t()

Handles the page request by building HTML response body and halting the Plug pipeline.