|
|
@ -20,14 +20,14 @@ mod config; |
|
|
|
mod server;
|
|
|
|
|
|
|
|
|
|
|
|
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
|
|
|
const DEFAULT_HOST: &'static str = "localhost";
|
|
|
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
|
|
|
const DEFAULT_HOST: &str = "localhost";
|
|
|
|
const DEFAULT_PORT: i16 = 8080;
|
|
|
|
|
|
|
|
lazy_static! {
|
|
|
|
static ref DEFAULT_PORT_STR: String = String::from(DEFAULT_PORT.to_string());
|
|
|
|
static ref DEFAULT_PORT_STR: String = DEFAULT_PORT.to_string();
|
|
|
|
static ref DEFAULT_WORKERS: usize = num_cpus::get();
|
|
|
|
static ref DEFAULT_WORKERS_STR: String = String::from(DEFAULT_WORKERS.to_string());
|
|
|
|
static ref DEFAULT_WORKERS_STR: String = DEFAULT_WORKERS.to_string();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
@ -60,7 +60,7 @@ fn main() { |
|
|
|
host, port, workers, config_path
|
|
|
|
);
|
|
|
|
|
|
|
|
let actix_server = actix_web::server::new(|| server::router::create())
|
|
|
|
let actix_server = actix_web::server::new(server::router::create)
|
|
|
|
.workers(workers)
|
|
|
|
.bind(format!("{}:{}", host, port));
|
|
|
|
|
|
|
|