18 lines
477 B
Python
18 lines
477 B
Python
"""Entrypoint for the program."""
|
|
from quart import Quart
|
|
from app.api import api_bp
|
|
|
|
app = Quart("jos", static_folder="web/dist", static_url_path="/")
|
|
app.register_blueprint(api_bp, url_prefix="/api")
|
|
|
|
|
|
@app.route("/", methods=["GET"], defaults={"path": ""})
|
|
@app.route("/<path:path>", methods=["GET"])
|
|
async def frontend(path):
|
|
"""Serves the Vue.js frontend."""
|
|
return await app.send_static_file("index.html")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run(host="0.0.0.0")
|