Serve index on root
This commit is contained in:
parent
8afeb618d3
commit
4064b4d9b7
@ -1,6 +1,6 @@
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user