celery,logger,limiter,cache,logo

This commit is contained in:
resonate
2022-01-24 11:58:28 +08:00
parent a3c61d3291
commit 2e6067fd31
15 changed files with 127 additions and 27 deletions
+17 -5
View File
@@ -1,15 +1,27 @@
from flask import Flask
from entrance import config
import os
from common.extend.logger import config_logger
from entrance.bps import sys, register_parent_bp
from entrance.extensions import init_extensions
def create_app():
config_logger()
app = Flask(__name__)
app.config.from_pyfile('config.py')
app.config.from_pyfile('config/config.py')
register_parent_bp(app)
init_extensions(app)
if os.environ.get('WERKZEUG_RUN_MAIN') == 'true':
print(
"""
___ _ _ _ ___ _ _
| _ \___ __ _ _ _ /_\ __| |_ __ (_)_ _ | __| |__ _ __| |__
| _/ -_) _` | '_| / _ \/ _` | ' \| | ' \ | _|| / _` (_-< / /
|_| \___\__,_|_| /_/ \_\__,_|_|_|_|_|_||_| |_| |_\__,_/__/_\_\\
"""
)
return app