Created
May 11, 2017 09:43
-
-
Save DmitryUlyanov/c44ecc7f86d84d9e807a147682af9ec7 to your computer and use it in GitHub Desktop.
Do not remember why, but starting server this correct is better
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request, render_template | |
app = Flask(__name__, static_url_path='', static_folder='') | |
@app.route('/') | |
def root(): | |
return app.send_static_file('sr_set5.html') | |
@app.route('/readme') | |
def readme(): | |
return app.send_static_file('README.md.html') | |
if __name__ == "__main__": | |
from gevent.wsgi import WSGIServer | |
http_server = WSGIServer(('0.0.0.0', 5123), app) | |
http_server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment