Initial commit

This commit is contained in:
2021-12-23 10:10:59 +00:00
commit d0693b71ec
11 changed files with 2908 additions and 0 deletions

22
src/main.rs Normal file
View File

@@ -0,0 +1,22 @@
extern crate dotenv;
extern crate env_logger;
extern crate listenfd;
use contextswitch::run;
use dotenv::dotenv;
use std::env;
use std::net::TcpListener;
pub mod taskwarrior;
#[actix_web::main]
async fn main() -> std::io::Result<()> {
env::set_var("RUST_LOG", "actix_web=info");
env_logger::init();
dotenv().ok();
let port = env::var("PORT").unwrap_or("8000".to_string());
let listener = TcpListener::bind(format!("0.0.0.0:{}", port)).expect("Failed to bind port");
run(listener)?.await
}