made server and details statics/consts
This commit is contained in:
parent
0e6d141704
commit
700c093c6b
22
src/main.rs
22
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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue