Skip to content

Commit

Permalink
asu: always host json and store folders
Browse files Browse the repository at this point in the history
in production this should be hosted by a real server

Signed-off-by: Paul Spooren <[email protected]>
  • Loading branch information
aparcar committed Aug 10, 2021
1 parent 68631e6 commit 9b0474e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions asu/asu.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def create_app(test_config: dict = None) -> Flask:

(Path().cwd()).mkdir(exist_ok=True, parents=True)

@app.route("/")
@app.route("/<path:path>")
def root(path="index.html"):
return send_from_directory(Path().cwd() / "public", path)
@app.route("/json/")
@app.route("/json/<path:path>")
def json_path(path="index.html"):
return send_from_directory(app.config["JSON_PATH"], path)

@app.route("/store/")
@app.route("/store/<path:path>")
def store(path="index.html"):
def store_path(path="index.html"):
return send_from_directory(app.config["STORE_PATH"], path)

from . import janitor
Expand Down

0 comments on commit 9b0474e

Please sign in to comment.