1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 10:27:42 +02:00

add config file to example

This commit is contained in:
Rob Ede
2022-07-31 20:26:40 +01:00
parent 983746f106
commit bcb8dbe1fc
2 changed files with 74 additions and 2 deletions

View File

@ -30,8 +30,8 @@ async fn index(settings: web::Data<Settings>) -> impl Responder {
#[actix_web::main]
async fn main() -> std::io::Result<()> {
let mut settings = Settings::parse_toml("./examples/Server.toml")
.expect("Failed to parse `Settings` from Server.toml");
let mut settings = Settings::parse_toml("./examples/config.toml")
.expect("Failed to parse `Settings` from config.toml");
// If the environment variable `$APPLICATION__HOSTS` is set,
// have its value override the `settings.actix.hosts` setting: