Skip to content

Commit

Permalink
Fix not imported os and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Sep 2, 2017
1 parent 524cb00 commit 3d9911a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example-flask-python3.6-index/app/main.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import os

from flask import Flask, send_file
app = Flask(__name__)


@app.route("/hello")
def hello():
return "Hello World from Flask in a uWSGI Nginx Docker container with \
Python 3.6 (from the example template)"


@app.route("/")
def main():
return send_file('./static/index.html')


# Everything not declared before (not a Flask route / API endpoint)...
@app.route('/<path:path>')
def route_frontend(path):
Expand All @@ -22,5 +27,6 @@ def route_frontend(path):
else:
return send_file('./static/index.html')


if __name__ == "__main__":
app.run(host='0.0.0.0', debug=True, port=80)

0 comments on commit 3d9911a

Please sign in to comment.