From f48ce5deb19d83e6d5e87f51c59e538f4b66d79e Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 6 Mar 2021 20:51:23 +0100 Subject: Switch back to Flask --- src/server.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/server.py (limited to 'src/server.py') diff --git a/src/server.py b/src/server.py new file mode 100644 index 0000000..2caddd6 --- /dev/null +++ b/src/server.py @@ -0,0 +1,21 @@ +#!/usr/bin/python3 +# vim: shiftwidth=4 tabstop=4 expandtab + + +import waitress +from flask import Flask + + +app = Flask(__name__) + + +@app.route("/", methods=["GET"]) +def index(): + return app.send_static_file("index.html") + + +if __name__ == '__main__': + waitress.serve(app, listen="127.0.0.1:8080") # production server / bind to port + #serve(app, unix_socket='/run/web-template/unix.sock') # production server / unix domain socket + #app.run() # debug server - NOT FOR PRODUCTION! + -- cgit v1.2.3-70-g09d2