Added ui
This commit is contained in:
@@ -4,6 +4,7 @@ extern crate diesel_migrations;
|
||||
|
||||
use std::env;
|
||||
|
||||
use actix_cors::Cors;
|
||||
use actix_web::{HttpServer, App};
|
||||
|
||||
use dotenv::dotenv;
|
||||
@@ -22,9 +23,15 @@ async fn main() -> std::io::Result<()> {
|
||||
let port = env::var("SERVICE_PORT").unwrap_or("5000".to_string());
|
||||
|
||||
match HttpServer::new(|| {
|
||||
let cors = Cors::default()
|
||||
.allow_any_origin()
|
||||
.allow_any_method()
|
||||
.allow_any_header()
|
||||
.max_age(3600);
|
||||
App::new()
|
||||
.configure(db::messages::init_routes)
|
||||
.configure(db::spells::init_routes)
|
||||
.wrap(cors)
|
||||
})
|
||||
.bind(format!("{}:{}", host, port)) {
|
||||
Ok(b) => {
|
||||
|
||||
Reference in New Issue
Block a user