i think hash-less urls are working

This commit is contained in:
Noah Levitt 2015-09-25 22:48:01 +00:00
parent 05e15b9667
commit 2e1601ac81
5 changed files with 24 additions and 15 deletions

View file

@ -7,7 +7,7 @@ import sys
logging.basicConfig(stream=sys.stdout, level=logging.INFO,
format="%(asctime)s %(process)d %(levelname)s %(threadName)s %(name)s.%(funcName)s(%(filename)s:%(lineno)d) %(message)s")
app = flask.Flask(__name__, static_url_path="")
app = flask.Flask(__name__)
r = rethinkstuff.Rethinker(["wbgrp-svc020", "wbgrp-svc035", "wbgrp-svc036"],
db="archiveit_brozzler")
@ -27,10 +27,12 @@ def jobs():
jobs_ = list(r.table("jobs").run())
return flask.jsonify(jobs=jobs_)
@app.route("/")
def root():
@app.route("/", defaults={"path": ""})
@app.route('/<path:path>')
def root(path):
return app.send_static_file("index.html")
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8081, debug=True)