def initialize_app(): instance_path = os.path.abspath(os.path.dirname(__file__) + '/../..') template_folder = os.path.join(instance_path, 'app/views') static_folder = os.path.join(instance_path, 'app/static') app = Flask('app', static_folder=static_folder, template_folder=template_folder, instance_path=instance_path) initialize_config(app) initialize_db(app) initialize_routes(app) return app
def initialize_app(): instance_path = os.path.abspath(os.path.dirname(__file__) + "/../..") template_folder = os.path.join(instance_path, "app/views") static_folder = os.path.join(instance_path, "app/static") app = Flask("app", static_folder=static_folder, template_folder=template_folder, instance_path=instance_path) initialize_config(app) initialize_db(app) initialize_routes(app) return app
def initialize_app(): instance_path = os.path.abspath(os.path.dirname(__file__) + '/../..') template_folder = os.path.join(instance_path, 'app/views') static_folder = os.path.join(instance_path, 'app/static') app = Flask('app', static_folder=static_folder, template_folder=template_folder, instance_path=instance_path) initialize_config(app) initialize_db(app) # TODO: Move Routes into specific initialize routes file routes.initialize_routes(app) return app
from system.init import app from system import socketio import subprocess from system.init.configuration import initialize_config from system.init.database import initialize_db from system.init.routes import initialize_routes initialize_config(app) initialize_db(app) initialize_routes(app) if __name__ == "__main__": socketio.run(app)