""" This script runs the Flask application using a development server. """ from os import environ from Flask import app if __name__ == '__main__': HOST = environ.get('SERVER_HOST', 'localhost') try: PORT = int(environ.get('SERVER_PORT', '5555')) except ValueError: PORT = 5555 app.config['SECRET_KEY'] = 'N/A' app.run(HOST, PORT)
from Flask import app if __name__ == '__main__': app.run(debug=True)
# -*- coding: utf-8 -*- """ This script runs the Flask application using a development server. """ from os import environ from Flask import app import config if __name__ == '__main__': app.run(host="192.168.8.128", port=80, debug=config.DEBUG) #app.run(host="192.168.43.151", port=80, debug=config.DEBUG)
# -*- coding: utf-8 -*- """ This script runs the Flask application using a development server. """ from os import environ from Flask import app if __name__ == '__main__': app.run(host="localhost", port=5000, debug=True)
# -*- coding: utf-8 -*- """ This script runs the Flask application using a development server. """ from os import environ from Flask import app if __name__ == '__main__': app.run()
from Flask import app if __name__ == "__main__": app.run()
def schedule_api(self): """ 开启API """ app.run(API_HOST, API_PORT)