Skip to main content

Module bootstrap

Module bootstrap 

Source
Expand description

Application bootstrap: one call to load config, connect, migrate, build the admin router, and serve it.

Bootstrap keeps an application’s main small and stable: framework internals (config fields, the migration runner, router assembly) change here, not in every app. An app registers its own modules; each module supplies its migrations and admin surfaces (resources, permissions, settings) from its register, and the app adds extra routes via Bootstrap::extend.

Structs§

AppConfig
The configuration Bootstrap loads. An app needing more loads its own with laterite_core::config::load.
Bootstrap
Builds and serves a Laterite application.
BootstrapCtx
Passed to Bootstrap::extend so an app’s own routes can share the database and the detected database capabilities.
PluginsConfig
Deployment control over which plugins load. A disabled plugin’s migrations do not run and it contributes nothing; any plugin that requires a disabled one is skipped in turn. Built-in modules cannot be disabled.

Constants§

DEFAULT_ENV_PREFIX
Default env-var prefix for config overrides (LAT__SECTION__KEY). An app declares its own as app.env_prefix in its config, which Bootstrap and the lat command both read; Bootstrap::env_prefix overrides even that.