Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 3151bdc21211eff5e17f1f40a77ba7fa01848218
parent 26ee13278264a181319005c9db8d9e79a84ccfe9
Author: Sergio Benitez <>
Date:   Mon, 15 Oct 2018 22:20:00 -0700

Revise 'rocket::custom()' explanation for updated guide.

Msite/guide/ | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/site/guide/ b/site/guide/ @@ -237,9 +237,10 @@ ROCKET_ARRAY=[1,"b",3.14] ROCKET_DICT={key="abc",val=123} ``` -## rocket::custom +## Custom Programmatic Configuration -Rocket can also be configured using `rocket::custom` and passing configuration options like so: +In addition to using environment variables or a config file, Rocket can also be +configured using the [`rocket::custom()`] method and [`ConfigBuilder`]: ```rust use rocket::config::{Config, Environment}; @@ -252,7 +253,12 @@ let config = Config::build(Environment::Staging) let app = rocket::custom(config, false); ``` -If Rocket is launched through `rocket::custom` it will ignore `Rocket.toml` and any environment variables present, allowing you to use your own configuration loading code. +Configuration via `rocket::custom()` replaces all configuration from +`Rocket.toml` or environment variables. In other words, using `rocket::custom()` +results in `Rocket.toml` and environment variables being ignored. + +[`rocket::custom()`]: @api/rocket/fn.custom.html +[`ConfigBuilder`]: @api/rocket/config/struct.ConfigBuilder.html ## Configuring TLS