fix mount

This commit is contained in:
ArnoChen
2025-02-09 23:28:29 +08:00
parent 489d7f6c12
commit 09ee968926
3 changed files with 5 additions and 5 deletions

View File

@@ -1455,7 +1455,7 @@ def create_app(args):
# Webui mount graph_viewer_webui/dist/index.html # Webui mount graph_viewer_webui/dist/index.html
webui_dir = Path(__file__).parent / "graph_viewer_webui" / "dist" webui_dir = Path(__file__).parent / "graph_viewer_webui" / "dist"
app.mount( app.mount(
"/webui", "/graph-viewer",
StaticFiles(directory=webui_dir, html=True), StaticFiles(directory=webui_dir, html=True),
name="webui_static", name="webui_static",
) )
@@ -1463,7 +1463,7 @@ def create_app(args):
# Serve the static files # Serve the static files
static_dir = Path(__file__).parent / "static" static_dir = Path(__file__).parent / "static"
static_dir.mkdir(exist_ok=True) static_dir.mkdir(exist_ok=True)
app.mount("/", StaticFiles(directory=static_dir, html=True), name="static") app.mount("/webui", StaticFiles(directory=static_dir, html=True), name="static")
return app return app

View File

@@ -98,7 +98,7 @@
</div> </div>
</div> </div>
<script src="/js/api.js"></script> <script src="./js/api.js"></script>
</body> </body>
</html> </html>

View File

@@ -284,8 +284,8 @@
// Initialize the display document management module // Initialize the display document management module
showSection('documents'); showSection('documents');
</script> </script>
<script src="js/lightrag.js"></script> <script src="./js/lightrag.js"></script>
<script src="js/graph.js"></script> <script src="./js/graph.js"></script>
<script src="https://d3js.org/d3.v7.min.js"></script> <script src="https://d3js.org/d3.v7.min.js"></script>
</body> </body>
</html> </html>