def run_app(): """Run the web application""" from everblog import app if len(sys.argv) < 2: subprocess.call([sys.executable, 'manage.py', 'run_app']) else: app.run(host = '0.0.0.0')
def run_app(): """Run the web application""" from everblog import app if len(sys.argv) < 2: subprocess.call([sys.executable, 'manage.py', 'run_app']) else: port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port = port)