View Source Inertia.SSR (Inertia v3.0.0-rc3)
Supervisor that provides server-side rendering support for Inertia views.
By default SSR is performed by a pool of Node.js workers
(Inertia.SSR.NodeJSAdapter), which requires the optional :nodejs
dependency. You can plug in an alternative runtime by implementing the
Inertia.SSR.Adapter behaviour and passing the module as the :ssr_adapter
option (in which case :nodejs is not needed).
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts the SSR supervisor and its adapter children.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Starts the SSR supervisor and its adapter children.
Options
:ssr_adapter- (optional) a module implementing theInertia.SSR.Adapterbehaviour. Defaults toInertia.SSR.NodeJSAdapter.
Any additional options are forwarded to the adapter's
Inertia.SSR.Adapter.init/1 callback. The default Node.js adapter
accepts:
:path- (required) the path to the directory where yourssr.jsfile lives.:module- (optional) the name of the Node.js module file. Defaults to"ssr".:esm- (optional) whether the SSR entrypoint is an ESM module. If unset, ESM is auto-detected from a.mjsmodule extension.:pool_size- (optional) the number of Node.js workers. Defaults to4.