Skip to content
Snippets Groups Projects
Commit f67f5ff3 authored by David Trattnig's avatar David Trattnig
Browse files

First version of clock route and static files.

parent 8c08a7c1
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,8 @@ from libraries.database.broadcasts import AuraDatabaseModel, Schedule, Playlist ...@@ -56,7 +56,8 @@ from libraries.database.broadcasts import AuraDatabaseModel, Schedule, Playlist
config = AuraConfig() config = AuraConfig()
app = Flask(__name__, app = Flask(__name__,
static_url_path='', static_url_path='',
static_folder='contrib/aura-player/public/') static_folder='web/')
# static_folder='contrib/aura-player/public/')
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
app.config["SQLALCHEMY_DATABASE_URI"] = config.get_database_uri() app.config["SQLALCHEMY_DATABASE_URI"] = config.get_database_uri()
...@@ -131,6 +132,12 @@ class EngineApi: ...@@ -131,6 +132,12 @@ class EngineApi:
content = open(os.path.join("contrib/aura-player/public/", "index.html")) content = open(os.path.join("contrib/aura-player/public/", "index.html"))
return Response(content, mimetype="text/html") return Response(content, mimetype="text/html")
# Static resources
@app.route('/clock', methods=['GET'])
def clock():
content = open(os.path.join("web/", "clock.html"))
return Response(content, mimetype="text/html")
# Print the API Spec # Print the API Spec
# TODO Generates HTML for specification # TODO Generates HTML for specification
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment