aboutsummaryrefslogtreecommitdiffstats
path: root/app.py
blob: 7d1f3dcf5889b00416a807a4b02fdcaf335a566f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3

import os

from flask import Flask
from flask import jsonify
from flask import redirect

app = Flask(__name__)

app.secret_key = os.environ.get("WEBPAGE_SECRET_KEY")


@app.route("/")
def index():
    return "Coming soon:tm:"


@app.route("/invite")
def invite():
    return redirect("http://invite.pythondiscord.com/")


@app.route("/healthcheck")
def healthcheck():
    return jsonify({"status": "ok"})


@app.errorhandler(404)
def page_not_found(e):
    return "replace me with a template, 404 not found", 404


if __name__ == '__main__':
    app.run(port=int(os.environ.get("WEBPAGE_PORT")), debug=False)