From 14e87216bc6ed338e40063931fd2f04efa940091 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Thu, 15 Oct 2020 08:53:31 +0500 Subject: [PATCH] Display config --- src/config.rs | 2 ++ src/main.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/config.rs b/src/config.rs index 83c0f70..b06ca8a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -10,12 +10,14 @@ const DEFAULT_PORT: u16 = 8000; const DEFAULT_DATABASE_URL: &str = "postgres://fedihub:fedihub@localhost/fedihub_development"; +#[derive(Debug)] pub enum Environment { Development, Test, Production, } +#[derive(Debug)] pub struct Config { pub root: String, pub environment: Environment, diff --git a/src/main.rs b/src/main.rs index 2ff3247..5e55261 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,5 +19,6 @@ extern crate rocket_contrib; fn main() { dotenv::dotenv().unwrap(); let config = config::Config::from_env().unwrap(); + println!("Running with {:#?}", config); web::rocket(config).launch(); }