41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
from flask import Flask
|
|
from dotenv import load_dotenv
|
|
import os
|
|
|
|
# Load environment variables
|
|
load_dotenv()
|
|
|
|
def create_app():
|
|
app = Flask(__name__, template_folder='../templates')
|
|
app.config['SECRET_KEY'] = os.getenv('SECRET_KEY')
|
|
|
|
# Register blueprints
|
|
from app.routes.auth import auth_bp
|
|
app.register_blueprint(auth_bp, url_prefix='/auth')
|
|
|
|
# Register probes blueprint
|
|
from app.routes.probes import probes_bp
|
|
app.register_blueprint(probes_bp, url_prefix='/probes')
|
|
|
|
# Register calibrations blueprint
|
|
from app.routes.calibrations import calibrations_bp
|
|
app.register_blueprint(calibrations_bp, url_prefix='/calibrations')
|
|
|
|
# Register work orders blueprint
|
|
from app.routes.work_orders import work_orders_bp
|
|
app.register_blueprint(work_orders_bp, url_prefix='/work_orders')
|
|
|
|
# Register locations blueprint
|
|
from app.routes.locations import locations_bp
|
|
app.register_blueprint(locations_bp, url_prefix='/locations')
|
|
|
|
# Register channels blueprint
|
|
from app.routes.channels import channels_bp
|
|
app.register_blueprint(channels_bp, url_prefix='/channels')
|
|
|
|
# Register standards blueprint
|
|
from app.routes.standards import standards_bp
|
|
app.register_blueprint(standards_bp, url_prefix='/standards')
|
|
|
|
return app
|