You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
448 B
21 lines
448 B
from dotenv import load_dotenv |
|
from flask import Flask |
|
|
|
from .core.config import Config |
|
from .db import init_app as init_db |
|
|
|
def create_app(): |
|
load_dotenv() |
|
|
|
app = Flask(__name__, instance_relative_config=True) |
|
app.config.from_object(Config) |
|
|
|
init_db(app) |
|
|
|
from .main.routes import bp as main_bp |
|
from .auth.routes import bp as auth_bp |
|
|
|
app.register_blueprint(main_bp) |
|
app.register_blueprint(auth_bp) |
|
|
|
return app
|
|
|