This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
2021-05-18 12:26:42 +02:00
|
|
|
"""Main entrypoint for the program."""
|
2021-05-18 11:45:44 +02:00
|
|
|
from quart import Quart
|
|
|
|
|
2021-05-18 22:06:37 +02:00
|
|
|
app = Quart("jos", static_folder="web/dist", static_url_path="/")
|
2021-05-18 11:45:44 +02:00
|
|
|
|
2021-05-18 12:26:42 +02:00
|
|
|
|
2021-05-18 22:09:16 +02:00
|
|
|
@app.route("/", methods=["GET"], defaults={"path": ""})
|
|
|
|
@app.route("/<path:path>", methods=["GET"])
|
2021-05-18 22:06:37 +02:00
|
|
|
async def frontend(path):
|
2021-05-18 22:09:16 +02:00
|
|
|
"""Serves the Vue.js frontend."""
|
2021-05-18 22:06:37 +02:00
|
|
|
return await app.send_static_file("index.html")
|
2021-05-18 11:45:44 +02:00
|
|
|
|
2021-05-18 12:26:42 +02:00
|
|
|
|
2021-05-18 12:15:21 +02:00
|
|
|
app.run(host="0.0.0.0")
|