def main(): app.run( host=config.HOST, port=config.PORT, debug=config.DEBUG, workers=config.WORKERS, )
from app.api import app app.run( host='0.0.0.0', port=5001, )
from app.api import app if __name__ == '__main__': app.run(host='0.0.0.0', port=8080, debug=True)
from app.api import app if __name__ == '__main__': app.run(host='0.0.0.0', debug=False)
from app.api import app if __name__ == '__main__': app.run()
# launch web server locally from app.api import app if __name__ == '__main__': # # no debug # application.run(host='0.0.0.0') # running in debug mode app.run(host='0.0.0.0', debug=True)
#!/usr/bin/env python3 from app.api import app if __name__ == '__main__': app.run(debug=True)
from app.api import app as application application.config.from_object('app.configuration') if __name__ == '__main__': host = application.config['HOST'] port = application.config['PORT'] application.run(host=host, port=port)
from app.api import app if __name__ == '__main__': app.run(host='0.0.0.0')
#!/usr/bin/env python # -*- coding: utf-8 -*- """A short and simple redirecting service""" from app.api import app if __name__ == '__main__': app.run(debug=True, host="0.0.0.0", port=5000)
def schedule_api(self): """ 开启API """ app.run(API_HOST, API_PORT)
def runserver(port, host, debug): click.echo('Start server at: {}:{}'.format(host, port)) app.run(host=host, port=port, debug=debug)
from app.api import app import settings if __name__ == "__main__": try: config = settings.load_config() app.run(host=config.HOST, port=int(config.PORT), debug=False) except KeyboardInterrupt: pass
from app.api import app from app import config if __name__ == '__main__': app.run(config.HOST, config.PORT)
import os from app.api import app if __name__ == "__main__": port = int(os.environ.get("PORT", 5000)) app.run(host="0.0.0.0", port=port)
def main(): app.run(debug=True, host="0.0.0.0", port=int("5000"))