Skip to content

Instantly share code, notes, and snippets.

@DmitryUlyanov
Created May 11, 2017 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DmitryUlyanov/c44ecc7f86d84d9e807a147682af9ec7 to your computer and use it in GitHub Desktop.
Save DmitryUlyanov/c44ecc7f86d84d9e807a147682af9ec7 to your computer and use it in GitHub Desktop.
Do not remember why, but starting server this correct is better
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