22 lines
459 B
Python
22 lines
459 B
Python
from flask import Flask
|
|
|
|
import logging
|
|
|
|
from apps.admin import admin as blueprint_admin
|
|
from apps.auth import auth as blueprint_auth
|
|
|
|
from config import secret_key
|
|
|
|
app = Flask(__name__)
|
|
app.secret_key = secret_key
|
|
|
|
app.register_blueprint(blueprint_auth)
|
|
app.register_blueprint(blueprint_admin)
|
|
|
|
if __name__ == '__main__':
|
|
from database import build_database
|
|
build_database()
|
|
logging.info("Build database models")
|
|
|
|
app.run(host="0.0.0.0")
|