Guest User

Untitled

a guest
Jun 7th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. # Relevant Lines For the Python Flask server.
  2. ############################# flask_app.py ##########################
  3. #!env/bin/python3
  4. from flask import Flask, request, Response, render_template, url_for
  5.  
  6. app = Flask(__name__, static_folder='./static/static')
  7.  
  8. @app.route('/')
  9. def ret_react():
  10. return render_template("index.html")
  11.  
  12. # This line isn't called unless I'm actively developing.
  13. if __name__ == "__main__":
  14. app.run("0.0.0.0", debug=False, port=80)
  15.  
  16.  
  17. ############################## wsgi.py #################################
  18. # this is what's called with Gunicorn
  19. from flask_app import app as application
  20.  
  21. if __name__ == "__main__":
  22. application.run()
Advertisement
Add Comment
Please, Sign In to add comment