def run(): try: app.run() except Exception as err: logging.error(err) finally: redb(r'static/db/redb/jianda1.pkl', r'static/pickle/jianda1.pkl') redb(r'static/db/redb/jianda1.db', r'static/db/imagedb/jianda1.db')
#!/bin/env python from views.views import app class BaseConfig(object): DEBUG = True SECRET_KEY = "" HOST ="localhost" PORT = 5000 class Develop(BaseConfig): pass if __name__ == '__main__': dev = Develop() app.run(host=dev.HOST, port=dev.PORT, debug=dev.DEBUG)
from views.views import app app.run(debug=True)
from flask import Flask from views.views import app if __name__ == "__main__": app.run(host='0.0.0.0')
from flask import Flask from views.views import app if __name__ == "__main__": app.run(host='0.0.0.0', port=5001)