aboutsummaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py35
1 files changed, 5 insertions, 30 deletions
diff --git a/app.py b/app.py
index 7d1f3dcf..f3bb9a60 100644
--- a/app.py
+++ b/app.py
@@ -1,35 +1,10 @@
-#!/usr/bin/env python3
+# coding=utf-8
-import os
+from pysite.route_manager import RouteManager
-from flask import Flask
-from flask import jsonify
-from flask import redirect
-
-app = Flask(__name__)
-
-app.secret_key = os.environ.get("WEBPAGE_SECRET_KEY")
-
-
-def index():
- return "Coming soon:tm:"
-
-
-def invite():
- return redirect("http://invite.pythondiscord.com/")
-
-
[email protected]("/healthcheck")
-def healthcheck():
- return jsonify({"status": "ok"})
-
-
-def page_not_found(e):
- return "replace me with a template, 404 not found", 404
+manager = RouteManager()
+app = manager.app
if __name__ == '__main__':
- app.run(port=int(os.environ.get("WEBPAGE_PORT")), debug=False)
+ manager.run()