# #
###############################################################################
+import fastapi
+import fastapi.middleware.cors
+
from .. import Backend
# Initialize the backend
backend = Backend("/etc/pakfire/pbs.conf")
#backend.launch_background_tasks()
-# Import the app
-from .app import app
+# Initialize the app
+app = fastapi.FastAPI(
+ title = "Pakfire Build Service API",
+ version = "0.0.1",
+
+ # Enable debug mode
+ debug = True,
+)
+
+# Add CORS
+app.add_middleware(
+ fastapi.middleware.cors.CORSMiddleware,
+ allow_origins=["https://pakfire.ipfire.org"],
+ allow_credentials=True,
+ allow_methods=["*"],
+ allow_headers=["*"],
+)
+
+# Load all further modules
+from . import builds
+++ /dev/null
-###############################################################################
-# #
-# Pakfire - The IPFire package management system #
-# Copyright (C) 2025 Pakfire development team #
-# #
-# This program is free software: you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation, either version 3 of the License, or #
-# (at your option) any later version. #
-# #
-# This program is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with this program. If not, see <http://www.gnu.org/licenses/>. #
-# #
-###############################################################################
-
-import fastapi
-import fastapi.middleware.cors
-
-app = fastapi.FastAPI(
- title = "Pakfire Build Service API",
- version = "0.0.1",
-
- # Enable debug mode
- debug = True,
-)
-
-# Add CORS
-app.add_middleware(
- fastapi.middleware.cors.CORSMiddleware,
- allow_origins=["https://pakfire.ipfire.org"],
- allow_credentials=True,
- allow_methods=["*"],
- allow_headers=["*"],
-)
-
-# Load all further modules
-from . import builds