Serve index on root

This commit is contained in:
Jakob Moser 2025-06-22 15:40:03 +02:00
parent 8afeb618d3
commit 4064b4d9b7
Signed by: jakob
GPG Key ID: 3EF2BA2851B3F53C

View File

@ -1,6 +1,6 @@
from collections.abc import Sequence from collections.abc import Sequence
from flask import Flask from flask import Flask, Response
def get_flask_app(songs: Sequence[dict[str, str]]) -> Flask: def get_flask_app(songs: Sequence[dict[str, str]]) -> Flask:
@ -13,4 +13,8 @@ def get_flask_app(songs: Sequence[dict[str, str]]) -> Flask:
def get_songs() -> list[dict[str, str]]: def get_songs() -> list[dict[str, str]]:
return songs_list return songs_list
@app.get("/")
def get_index() -> Response:
return app.send_static_file("index.html")
return app return app