Flask_API.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import flask
  2. from flask_cors import CORS
  3. from blueprint.as_api import ansheng
  4. from blueprint.hb_api import hengbang
  5. from blueprint.xubao_api import xubao
  6. from blueprint.za_api import zhongan
  7. from blueprint.gs_api import guoshou
  8. from blueprint.get_resapi import getres
  9. from blueprint.tp_api import taiping
  10. from blueprint.hn_api import huanong
  11. # from blueprint.ed_api import edian
  12. from blueprint.ht_api import huatai
  13. from blueprint.tk_api import taikang
  14. from gevent import pywsgi
  15. from logs.getlogs import *
  16. from dateutil.relativedelta import relativedelta
  17. api = flask.Flask(__name__)
  18. api.register_blueprint(ansheng)
  19. api.register_blueprint(hengbang)
  20. api.register_blueprint(zhongan)
  21. api.register_blueprint(xubao)
  22. api.register_blueprint(guoshou)
  23. api.register_blueprint(taiping)
  24. api.register_blueprint(getres)
  25. api.register_blueprint(huanong)
  26. api.register_blueprint(huatai)
  27. api.register_blueprint(taikang)
  28. # api.register_blueprint(edian)
  29. #跨域
  30. CORS(api, supports_credentials=True)
  31. if __name__ == '__main__':
  32. server = pywsgi.WSGIServer(('0.0.0.0', 80), api)
  33. server.serve_forever()
  34. # api.run(host="0.0.0.0", port=80,debug=True)