Skip to content

Commit

Permalink
fix: #122 pip安装方式下,static目录找不到报错
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed Jul 15, 2024
1 parent 4a7b5ac commit 8ff04dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xiaomusic/httpserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def HttpInit(_xiaomusic):
config = xiaomusic.config
log = xiaomusic.log

app.mount("/static", StaticFiles(directory="xiaomusic/static"), name="static")
folder = os.path.dirname(__file__)
app.mount("/static", StaticFiles(directory=f"{folder}/static"), name="static")
reset_http_server()


Expand Down

0 comments on commit 8ff04dd

Please sign in to comment.