Genie.Configuration.isdevFunction
isdev()  :: Bool

Set of utility functions that return whether or not the current environment is development, production or testing.

Examples

julia> Configuration.isdev()
true

julia> Configuration.isprod()
false
source
Genie.Configuration.isprodFunction
isprod() :: Bool

Set of utility functions that return whether or not the current environment is development, production or testing.

Examples

julia> Configuration.isdev()
true

julia> Configuration.isprod()
false
source
Genie.Configuration.istestFunction
istest() :: Bool

Set of utility functions that return whether or not the current environment is development, production or testing.

Examples

julia> Configuration.isdev()
true

julia> Configuration.isprod()
false
source
Genie.Configuration.SettingsType
mutable struct Settings

App configuration - sets up the app's defaults. Individual options are overwritten in the corresponding environment file.

Arguments

  • server_port::Int: the port for running the web server (default 8000)
  • server_host::String: the host for running the web server (default "127.0.0.1")
  • server_document_root::String: path to the document root (default "public/")
  • server_handle_static_files::Bool: if true, Genie will also serve static files. In production, it is recommended to serve static files with a web server like Nginx.
  • server_signature::String: Genie's signature used for tagging the HTTP responses. If empty, it will not be added.
  • app_env::String: the environment in which the app is running (dev, test, or prod)
  • cors_headers::Dict{String,String}: default Access-Control-* CORS settings
  • cors_allowed_origins::Vector{String}: allowed origin hosts for CORS settings
  • cache_duraction::Int: cache expiration time in seconds
  • log_level::Logging.LogLevel: logging severity level
  • log_to_file::Bool: if true, information will be logged to file besides REPL
  • assets_fingerprinted::Bool: if true, asset fingerprinting is used in the asset pipeline
  • session_key_name::String: the name of the session cookie
  • session_storage::Symbol: the backend adapter for session storage (default File)
  • inflector_irregulars::Vector{Tuple{String,String}}: additional irregular singular-plural forms to be used by the Inflector
  • run_as_server::Bool: when true the server thread is launched synchronously to avoid that the script exits
  • websockets_server::Bool: if true, the websocket server is also started together with the web server
  • html_parser_close_tag::String: default " /". Can be changed to an empty string "" so the single tags would not be closed.
  • ssl_enabled::Bool: default false. Server runs over SSL/HTTPS in development.
  • ssl_config::MbedTLS.SSLConfig: default nothing. If not nothing and ssl_enabled, it will use the config to start the server over HTTPS.
source