olive/config
Types
Holds all the important bits to run olive
pub type Config {
Config(
logger: logging.Logger,
main_port: Int,
proxy_port: Int,
bind: String,
root: String,
name: String,
dirs: List(String),
)
}
Constructors
-
Config( logger: logging.Logger, main_port: Int, proxy_port: Int, bind: String, root: String, name: String, dirs: List(String), )
Arguments
-
main_port
The main port needs to match the one listen by the main server
-
proxy_port
The proxy port is used by olive to create the web proxy server
-
bind
The bind address needs to match the one used by the main server and is used by the proxy to replicate the same behaviour
-
root
The root dir, where gleam.toml lives
-
name
The name of the project (field “name” in gleam.toml)
-
dirs
The list of dirs olive needs to watch to trigger live reload
-
Functions
pub fn read_config(
logger: Logger,
options: CliOptions,
) -> Result(Config, String)