Add production Makefile

This commit is contained in:
2025-12-03 09:43:04 +01:00
parent 4110f4d063
commit 6392c0a2c7
10 changed files with 165 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ use matrixgw_backend::controllers::matrix::{
};
use matrixgw_backend::controllers::{
auth_controller, matrix_link_controller, matrix_sync_thread_controller, server_controller,
tokens_controller, ws_controller,
static_controller, tokens_controller, ws_controller,
};
use matrixgw_backend::matrix_connection::matrix_manager::MatrixManagerActor;
use matrixgw_backend::users::User;
@@ -202,6 +202,12 @@ async fn main() -> std::io::Result<()> {
"/api/matrix/media/{mxc}",
web::get().to(matrix_media_controller::serve_mxc_handler),
)
// Static assets
.route("/", web::get().to(static_controller::root_index))
.route(
"/{tail:.*}",
web::get().to(static_controller::serve_static_content),
)
})
.workers(4)
.bind(&AppConfig::get().listen_address)?