Serve Frontend with Actix
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 15s
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 15s
This commit is contained in:
parent
efd11a39b9
commit
df4808bf38
@ -1,4 +1,5 @@
|
||||
use actix_cors::Cors;
|
||||
use actix_files as fs;
|
||||
use actix_web::{web, App, HttpServer};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
@ -23,6 +24,7 @@ async fn main() -> std::io::Result<()> {
|
||||
.allow_any_method(),
|
||||
)
|
||||
.app_data(web::Data::new(db.clone()))
|
||||
.service(fs::Files::new("/", "./frontend/dist").index_file("index.html"))
|
||||
.route("/login", web::post().to(handlers::login)) // Public: Login
|
||||
.route(
|
||||
"/forms/{id}/submissions",
|
||||
|
Loading…
Reference in New Issue
Block a user