2018-09-29 09:54:16 +02:00
|
|
|
extern crate actix;
|
2019-07-12 07:28:46 +02:00
|
|
|
extern crate env_logger;
|
2018-09-29 09:54:16 +02:00
|
|
|
|
2018-10-03 13:21:21 +02:00
|
|
|
extern crate rsidm;
|
2019-05-08 02:39:46 +02:00
|
|
|
|
2018-11-26 07:13:22 +01:00
|
|
|
use rsidm::config::Configuration;
|
|
|
|
use rsidm::core::create_server_core;
|
2018-11-11 22:59:09 +01:00
|
|
|
|
2018-09-29 09:54:16 +02:00
|
|
|
fn main() {
|
2019-07-12 07:28:46 +02:00
|
|
|
// Read our config (if any)
|
2018-11-26 07:13:22 +01:00
|
|
|
let config = Configuration::new();
|
2019-07-12 07:28:46 +02:00
|
|
|
|
|
|
|
// Configure the server logger. This could be adjusted based on what config
|
|
|
|
// says.
|
|
|
|
::std::env::set_var("RUST_LOG", "actix_web=info,rsidm=info");
|
|
|
|
env_logger::init();
|
|
|
|
|
2018-11-26 07:13:22 +01:00
|
|
|
let sys = actix::System::new("rsidm-server");
|
2018-09-29 09:54:16 +02:00
|
|
|
|
2018-11-26 07:13:22 +01:00
|
|
|
create_server_core(config);
|
2018-09-29 09:54:16 +02:00
|
|
|
let _ = sys.run();
|
|
|
|
}
|