Phoenix.React.Server (Phoenix.React v0.5.2)

View Source

The React Render Server

Start React Render server by setting.

config :phoenix_react_server, Phoenix.React,
  runtime: Phoenix.React.Runtime.Bun,
  component_base: Path.expand("../assets/component", __DIR__),
  cache_ttl: 10

Summary

Functions

Returns a specification to start this module under a supervisor.

Return the configuration of the React Render Server from Application.get_env(:phoenix_react_server, Phoenix.React)

Types

millisecond()

@type millisecond() :: integer()

second()

@type second() :: integer()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

config()

@spec config() :: [
  {:cache_ttl, second()}
  | {:component_base, binary()}
  | {:render_timeout, millisecond()}
  | {:runtime, module()},
  ...
]

Return the configuration of the React Render Server from Application.get_env(:phoenix_react_server, Phoenix.React)

set_runtime_process(pid)

start_link(init_arg)