blob: 2caddd67de90dc68187123a35f65a13a93feb4c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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!
|