Skip to content

Commit

Permalink
Remove commented out code and clean up main function in main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
slackspace-io committed Apr 14, 2024
1 parent 2f0a21a commit 8ffcb64
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ use dioxus::prelude::*;
use log::info;
use crate::config::Settings;

//#[cfg(feature = "server")]
//use k8s_openapi::merge_strategies::list::set;
//use std::env;
//
mod config;
mod database;
mod gitops;
Expand All @@ -35,18 +31,14 @@ mod site;
#[tokio::main]
async fn main() {
println!("Hello, world!");
//Logging and env variables
env::set_var("RUST_LOG", "info");
env_logger::init();
// dotenv::dotenv().ok();
// Load Configurations
let settings = Settings::new().unwrap_or_else(|err| {
log::error!("Failed to load settings: {}", err);
panic!("Failed to load settings: {}", err);
});
log::info!("Starting up");
log::info!("Loading configuration {:?}", settings);
//create table if not exist
#[cfg(feature = "server")]
use crate::database::client::create_table_if_not_exist;
create_table_if_not_exist().unwrap();
Expand All @@ -59,12 +51,9 @@ async fn main() {
config = config.addr(std::net::SocketAddr::from(([0, 0, 0, 0], 8080)));
}

// Launch the app with the custom menu
let site = std::thread::spawn(|| LaunchBuilder::new().with_cfg(config).launch(App));
//let site = std::thread::spawn(|| launch(App));
log::info!("Started logger");
println!("Started print");
//let _ = web::exweb::site();
site.join().unwrap();
}

Expand Down

0 comments on commit 8ffcb64

Please sign in to comment.