cloud-fog-service-broker/cfsb-backend/app_factory.py
Gregory Koronakos c504f94705 rank node candidates
Change-Id: I260f8105cdd675d9475a9179149a445c4f56fa17
2024-03-20 01:27:00 +02:00

12 lines
389 B
Python

# Created for application setup
from flask import Flask, request, jsonify, render_template
from flask_cors import CORS, cross_origin
from routes import main_routes # Adjusted to absolute import
def create_app():
app = Flask(__name__)
# CORS(app)
CORS(app, supports_credentials=True) # Enable CORS and allow credentials
app.register_blueprint(main_routes)
return app