Recombined bot and service, fixed dockerfile

This commit is contained in:
Benjamin Sherriff
2023-10-05 15:38:59 -04:00
parent 5915a29dd5
commit 5dcc2a6afc
27 changed files with 64 additions and 153 deletions

View File

@@ -10,6 +10,7 @@ use actix_web::{HttpServer, App};
use dotenv::dotenv;
use log::{error, info, warn};
mod bot;
mod db;
#[actix_web::main]
@@ -25,6 +26,8 @@ async fn main() -> std::io::Result<()> {
let host = env::var("SERVICE_HOST").unwrap_or("localhost".to_string());
let port = env::var("SERVICE_PORT").unwrap_or("5000".to_string());
tokio::spawn(bot::run());
match HttpServer::new(|| {
let cors = Cors::default()
.allow_any_origin()