|
@@ -11,7 +11,7 @@ from apps.extensions.hook import (init_banner, init_middlewares, register_db,
|
|
|
|
|
|
from fastapi import FastAPI
|
|
|
from fastapi.routing import APIRoute
|
|
|
-
|
|
|
+from fastapi.staticfiles import StaticFiles
|
|
|
|
|
|
def custom_generate_unique_id(route: APIRoute) -> str:
|
|
|
return f"{route.tags[0]}-{route.name}"
|
|
@@ -35,7 +35,7 @@ def create_app(config_name="dev") -> FastAPI:
|
|
|
register_db(app=fastapp)
|
|
|
register_exception_handlers(app=fastapp)
|
|
|
register_routes(app=fastapp)
|
|
|
+
|
|
|
+ fastapp.mount("/static", StaticFiles(directory="./static"), name="static")
|
|
|
+
|
|
|
return fastapp
|
|
|
-
|
|
|
-
|
|
|
-fastapp = create_app()
|