pub struct AppConfig {Show 24 fields
pub domain: String,
pub contacts: Vec<String>,
pub version: String,
pub storage_size: u64,
pub default_timeout: Option<u16>,
pub runtime: Option<RuntimeMode>,
pub hide_schema: Option<bool>,
pub client_rendering: Option<bool>,
pub client_e2ee: Option<bool>,
pub client_tracing: Option<bool>,
pub port: Option<u16>,
pub redirect_port: Option<u16>,
pub logging: Option<LoggingConfig>,
pub error: Option<ErrorConfig>,
pub auth: Option<AuthConfig>,
pub globals: Option<Vec<Global>>,
pub secrets: Option<Vec<Secret>>,
pub flags: Option<Vec<Flag>>,
pub content: Option<Content>,
pub models: Option<Vec<ModelConfig>>,
pub integrations: Option<Vec<IntegrationConfig>>,
pub actions: Option<Vec<ActionConfig>>,
pub assets: Option<AssetsConfig>,
pub templates: Option<Vec<TemplateConfig>>,
}Expand description
Config definition for an Ordinary Application
Fields§
§domain: StringDomain name for the application to be run from the deployment environment.
contacts: Vec<String>list of email addresses that can be used to contact the application owner or administrators.
version: StringVersion of the site build.
storage_size: u64Storage size in bytes (rounded up to nearest OS page size).
default_timeout: Option<u16>Default request timeout.
Unit (seconds).
runtime: Option<RuntimeMode>Specifies runtime mode for application on the host.
If none is specified, defaults to Shared (or host default).
hide_schema: Option<bool>When set to true, {{ domain }}/.ordinary/schema
is not addressable.
Note: this can break applications which depend on
flags, and action/template query descriptors.
client_rendering: Option<bool>Include template rendering code in the client WASM.
client_e2ee: Option<bool>Include E2EE handler code in the client WASM.
client_tracing: Option<bool>Include E2EE handler code in the client WASM.
port: Option<u16>Port to be used for standalone “run” instances.
redirect_port: Option<u16>port used for redirecting from http when standalone is running in secure mode.
logging: Option<LoggingConfig>§error: Option<ErrorConfig>Configures error handling.
Note: If not included just the error message will be sent back as text.
auth: Option<AuthConfig>Auth config for the Ordinary application.
globals: Option<Vec<Global>>Global constants that can be accessed from templates
secrets: Option<Vec<Secret>>Secrets that can be used by integrations.
flags: Option<Vec<Flag>>Feature flags which can be referenced from templates to inform application behavior, and run experiments.
content: Option<Content>Definitions for static content “types”/object structure that can be used to inform template/page development (i.e one might define a “post” content definition, and then create a template for their blog).
models: Option<Vec<ModelConfig>>Definitions for the models that will be stored in the Ordinary database.
integrations: Option<Vec<IntegrationConfig>>Definitions for the external APIs that will be integrated into the Ordinary application.
actions: Option<Vec<ActionConfig>>IO, access and language configuration for actions that are compiled to and executed as WebAssembly modules.
assets: Option<AssetsConfig>Specifies the asset directory and per-path configuration details for assets that require preprocessing (TypeScript, SCSS, JavaScript minification, etc.)
templates: Option<Vec<TemplateConfig>>Configuration for the templates/pages that the application will render. Each template is compiled to a WebAssembly module which accepts runtime arguments for models/content/integrations, and can be executed on either the server or the client.
With the option to render on the client, only the result of the server query needs to be sent, in a compact, optimized, format.
Currently all rendering is happening server-side, and only HTML is being sent.
In an ideal/future state multiple modes will be supported, even up to a full ‘noscript’ config.