flask-twisted icon indicating copy to clipboard operation
flask-twisted copied to clipboard

Some questions about flask-twisted.

Open jiaxiaolei opened this issue 8 years ago • 0 comments

Some questions about the code blow:

  1. flask.ext.twisted is deprecatd, use flask_twisted instead.
  2. why not provide a demo which can work well? The demo blow can not work.
  3. After twisted = Twisted(app), we shoud use twisted.run(host='0.0.0.0',port=13579, debug=False)(or like this) to run, rather than just app.run()
from flask import Flask
from flask.ext.twisted import Twisted

app = Flask(__name__)
twisted = Twisted(app)

...

if __name__ == "__main__":
    app.run()
  1. I can not run the code below successfully, and I do not know that does it mean and why it looks like this.
Twisted Daemon

from twisted.application.service import Application
from app import twisted

application = Application('twisted-flask')
twisted.run(run_reactor=False)
Save it as app.tac (or something similar) and run it with your Twistd program.

twistd -ny app.tac

Any reply will be appreciated.

jiaxiaolei avatar Aug 16 '17 13:08 jiaxiaolei