[WIP] WTransport
This commit is contained in:
parent
ad4631485e
commit
f379a0c015
3 changed files with 31 additions and 49 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -7,9 +7,11 @@ use crate::sql::sql::initialize_db;
|
|||
use crate::sql::sql::print_users;
|
||||
use crate::util::crypto_helper::load_public_key;
|
||||
use crate::util::crypto_helper::load_secret_key;
|
||||
use crate::util::logger::PrintType;
|
||||
use crate::util::logger::startup;
|
||||
use dotenv::dotenv;
|
||||
use once_cell::sync::Lazy;
|
||||
use rustls::crypto::aws_lc_rs::default_provider;
|
||||
use std::env;
|
||||
|
||||
static PRIVATE_KEY: Lazy<String> = Lazy::new(|| env::var("PRIVATE_KEY").unwrap());
|
||||
|
|
@ -23,13 +25,20 @@ pub fn get_public_key() -> x448::PublicKey {
|
|||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
if let Err(_) = default_provider().install_default() {
|
||||
println!("Error loading Provider");
|
||||
return;
|
||||
}
|
||||
dotenv().ok();
|
||||
startup();
|
||||
log_in!("Incoming messages");
|
||||
log_out!("Outgoing messages");
|
||||
|
||||
tokio::spawn(async move {
|
||||
let _ = omikron_connection::start(9187).await;
|
||||
match omikron_connection::start(9187).await {
|
||||
Err(e) => log_err!(0, PrintType::General, "{:?}", e),
|
||||
_ => {}
|
||||
}
|
||||
});
|
||||
|
||||
log!("Started");
|
||||
|
|
|
|||
Loading…
Reference in a new issue