Added runserver parameter for development
This commit is contained in:
parent
7acf3d3561
commit
be0c212bd6
@ -13,5 +13,22 @@ def create_all_tables():
|
||||
pass
|
||||
#db.create_all()
|
||||
|
||||
@manager.command
|
||||
def runserver():
|
||||
try:
|
||||
from application import config
|
||||
PORT = config.Config.PORT
|
||||
HOST = config.Config.HOST
|
||||
DEBUG = config.Config.DEBUG
|
||||
except ImportError:
|
||||
PORT = 5000
|
||||
HOST = '0.0.0.0'
|
||||
DEBUG = True
|
||||
|
||||
app.run(
|
||||
port=PORT,
|
||||
host=HOST,
|
||||
debug=DEBUG)
|
||||
|
||||
if __name__ == '__main__':
|
||||
manager.run()
|
||||
|
Loading…
x
Reference in New Issue
Block a user