python - Run app from Flask-Migrate manager -


i used these lines start application:

from app import app app.run(host='0.0.0.0', port=8080, debug=true) 

using flask-migrate, have instead:

from app import manager manager.run() 

manager.run not take same arguments app.run, how define host , port?

manage.py replaces running app python app.py. provided flask-script, not flask-migrate adds commands it. use runserver command supplies run dev server. can pass host , port command:

python manage.py runserver -h localhost -p 8080 -d 

or can override defaults when configuring manager:

manager = manager() manager.add_command('runserver', server(host='localhost', port=8080, debug=true) 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -