app.py 899 Bytes
Newer Older
Weizhi Cui's avatar
Weizhi Cui committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
# @Version     : Python 3.11.4
# @Software    : Sublime Text 4
# @Author      : StudentCWZ
# @Email       : StudentCWZ@outlook.com
# @Date        : 2023/10/28 13:49
# @File        : app.py
# @Description :
"""

from application import create_app

崔为之's avatar
崔为之 committed
15 16 17 18 19 20 21 22 23 24 25 26

def runserver():
    """
    This function creates a new instance of the Flask application and runs it.
    """

    # Create a new instance of the Flask application
    app = create_app()

    # Run the Flask development server
    # The run() method starts the application's development server.
    # It's not meant to be used on production environment.
崔为之's avatar
崔为之 committed
27
    app.run(debug=True, use_reloader=False)
Weizhi Cui's avatar
Weizhi Cui committed
28 29


崔为之's avatar
崔为之 committed
30
if __name__ == '__main__':
崔为之's avatar
崔为之 committed
31 32 33
    # Only run the development server if the script is executed directly.
    # This allows other scripts to import this file without starting the server.
    runserver()