Public server entrypoint for Breeze applications.
Startup Options
start_link/1 and run/1 accept these public startup options:
:view- the root view module. Required.:start_opts- keyword options passed to the root view'smount/2. Defaults to[].:theme- aBreeze.Theme, theme map/keyword, or built-in theme atom.:global_keybindings- app-wide keybindings checked before focused event handling.:reload- enables live code reload. Defaults toApplication.get_env(:breeze, :reload, false). Passtrueto enable reload in dev, or a keyword list for reload options.:inspector- enables inspector support. Defaults tofalse. Passtrueor keyword options such as:toggle_key,:move_key, andremote: falseto keep inspection local without starting distributed Erlang. SeeBreeze.Inspectorfor the complete feature and option reference.:logger- configures Breeze log capture. Pass:attachto add a handler while preserving existing handlers,:replaceto temporarily silence the default handler, a keyword list with:modeand:max_entries, orfalseto disable capture. Inspector-enabled servers default to:attach; other servers default tofalse.:alt_screen- enters the terminal alternate screen. Defaults totrue.:hide_cursor- hides the terminal cursor while the app runs. Defaults totrue.:enhanced_keyboard- enables enhanced keyboard reporting. Defaults totrue.:mouse- enables mouse tracking. Defaults tofalse. Passtruefor click mode or keyword options forTermite.Screen.enable_mouse/2.:terminal_opts- options passed toTermite.Terminal.start/1when Breeze starts the terminal.:terminal- an existing%Termite.Terminal{}to use instead of starting one.:halt_fun- function called when the input router exits. Defaults toSystem.halt/0outside IEx and no-op inside IEx. Usefn -> :ok endfor embedded or SSH sessions.:render_errors- crash rendering options. Passview: MyErrorViewto override the crash screen view. Defaults to the built-in crash view. Passkeybindings: [...]to configure custom crash screen actions as{key, label, action}tuples. Supported actions are:restart,:stop, and:copy_details. Custom error views receive these assigns:@view, the crashed root view module;@crash, the crash map;@kind, the crash kind;@reason, the exception, exit reason, or thrown value;@stacktrace, the captured stacktrace; and@breeze.keybindings, the configured visible keybindings.
Summary
Functions
Returns a specification to start this module under a supervisor.
Run the Breeze application until it exits.
Start the Breeze application.
Types
@type option() :: {:view, module()} | {:start_opts, keyword()} | {:alt_screen, boolean()} | {:hide_cursor, boolean()} | {:enhanced_keyboard, boolean()} | {:mouse, boolean() | keyword()} | {:terminal_opts, keyword()} | {:terminal, %Termite.Terminal{adapter: term(), reader: term(), size: term()}} | {:reload, boolean() | keyword()} | {:theme, Breeze.Theme.t() | map() | keyword() | atom()} | {:halt_fun, (-> term())} | {:global_keybindings, list()} | {:inspector, boolean() | keyword()} | {:logger, false | :attach | :replace | keyword()} | {:render_errors, keyword()}
A public Breeze server startup option.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Run the Breeze application until it exits.
This is intended for interactive sessions such as IEx. It starts the terminal
input router without linking it to the caller, waits for the app to stop, and
returns :ok instead of halting the VM.
@spec start_link(keyword()) :: GenServer.on_start()
Start the Breeze application.
See the module documentation for startup options.