diff --git a/src/logarion_webserver.ml b/src/logarion_webserver.ml index 0d7212e..3387cce 100644 --- a/src/logarion_webserver.ml +++ b/src/logarion_webserver.ml @@ -133,11 +133,12 @@ let serve config_filename = >>= html_response in + let port = match Uri.port web_config.Configuration.url with Some p -> p | None -> 3666 in print_endline @@ "Server address: " ^ Uri.to_string web_config.Configuration.url; print_endline @@ "Press Ctrl+C to stop."; let app = App.empty - |> App.port (match Uri.port web_config.Configuration.url with Some p -> p | None -> 3666) + |> App.port port |> middleware @@ Middleware.static ~local_path:(Fpath.to_string web_config.Configuration.static)