app.py 590 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. '''
  4. @Contact : liuyuqi.gov@msn.cn
  5. @Time : 2025/03/11 18:53:52
  6. @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
  7. @Desc :
  8. '''
  9. from models import db
  10. from flask import Flask
  11. from config import Config
  12. from routes import index_bp
  13. from utils.filters import init_app
  14. app = Flask(__name__)
  15. app.config.from_object(Config)
  16. app.register_blueprint(index_bp)
  17. init_app(app)
  18. if __name__ == '__main__':
  19. db.init_app(app)
  20. with app.app_context():
  21. db.create_all()
  22. app.run(debug=True, host='0.0.0.0', port=5000)