def server(): """ サーバ起動 """ from app.lib.logger import server_handler app.logger.addHandler(server_handler()) app.run(host=app.config["SERVER_IP"], port=app.config["SERVER_PORT"])
#!/usr/bin/env python # -*- coding: utf-8 -*- from app.application import app if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, debug=True)
#!flask/bin/python from app.application import app app.run(debug=True, host='0.0.0.0', port=5050)
from app.application import app if __name__ == "__main__": app.run()
from app.application import app if __name__ == '__main__': # This is used when running locally only. When deploying to Google App # Engine, a webserver process such as Gunicorn will serve the app. This # can be configured by adding an `entrypoint` to app.yaml. app.run(host='127.0.0.1', port=8080, debug=True)
from app.application import app from app.config import config if __name__ == '__main__': app.run(host=config.APP_HOST, port=config.APP_PORT, debug=config.DEBUG)
""" Flask initialization Server entry-point comment """ from app.application import app if __name__ == '__main__': app.run(debug=True)
from app.application import app app.run(host='0.0.0.0', port=8080, debug=True)
""" The File contains the script that starts the application """ # Run a application server. from app.application import app import urllib.parse as urlparse import os #import app if __name__ == '__main__': port = int(os.environ.get("PORT", 5000)) app.run(host='0.0.0.0', port=port, debug=True)