diff --git a/src/main.rs b/src/main.rs index b17a7e5..1f86a00 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,17 +1,23 @@ +#[macro_use] +extern crate lazy_static; + mod server; -// mod server_v2; + use crate::server::server_profile::Server; -fn main(){ - let server_name: &'static str = "Server-01"; - let server_address: &'static str = "0.0.0.0:6000"; - let server_author: &'static str = "noreply@email.com"; +fn main(){ + lazy_static!{ + static ref server_name: &'static str = "Server-01"; + static ref server_address: &'static str = "0.0.0.0:6000"; + static ref server_author: &'static str = "noreply@email.com"; + static ref SERVER: Server<'static> = Server::new(&server_name, &server_address, &server_author); + } /* let server_name = String::from("Server-01"); let server_address = String::from("0.0.0.0:6000"); - let server_owner = String::from("noreply@email.com"); + let server_author = String::from("noreply@email.com"); */ - let server = Server::new(server_name, server_address, server_author); - //server.start(); + //let server = Server::new(server_name, server_address, server_author); + SERVER.start(); }