diff options
Diffstat (limited to '')
| -rw-r--r-- | app.py | 35 | 
1 files changed, 5 insertions, 30 deletions
| @@ -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") - - [email protected]("/") -def index(): -    return "Coming soon:tm:" - - [email protected]("/invite") -def invite(): -    return redirect("http://invite.pythondiscord.com/") - - [email protected]("/healthcheck") -def healthcheck(): -    return jsonify({"status": "ok"}) - - [email protected](404) -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() | 
