Verified Commit 4064b4d9 authored by Jakob Moser's avatar Jakob Moser
Browse files

Serve index on root

parent 8afeb618
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
from collections.abc import Sequence

from flask import Flask
from flask import Flask, Response


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]]:
        return songs_list

    @app.get("/")
    def get_index() -> Response:
        return app.send_static_file("index.html")

    return app