flowgate/src/main.rs
2025-04-06 20:16:15 +03:00

16 lines
408 B
Rust
Executable File

use std::{fs, path::Path, sync::{Arc, RwLock}};
use flowgate::{config::Config, server::FlowgateServer};
fn main() {
colog::init();
if !Path::new("conf.yml").exists() {
let _ = fs::write("conf.yml", include_bytes!("../conf.yml"));
}
let config = Arc::new(RwLock::new(Config::parse("conf.yml").unwrap()));
let server = FlowgateServer::new(config.clone());
server.start();
}