Display config
This commit is contained in:
parent
0e41f6a853
commit
14e87216bc
2 changed files with 3 additions and 0 deletions
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Reference in a new issue