app = Flask(__name__)

@app.route('/')
def index():
    return redirect(url_for('static', filename='index.html'))
if __name__ == '__main__':
    root = resource.Resource()
root.putChild('', wsgi.WSGIResource(reactor, reactor.getThreadPool(), app))
root.putChild('static', static.File('./static'))
root.putChild('my_event_source', SSEResource())
reactor.listenTCP(8001, server.Site(root))
reactor.run()
Server-sent events with Python,Twisted and Flask: is this a correct approach for sleeping?