Merge branch 'master' into master

This commit is contained in:
vastsa authored and GitHub committed 2022-12-13 22:13:27 +08:00
commit 63d60022d2
7 files changed
+16 -16

No files matched your search

+3 -2
View File
@@ -22,8 +22,9 @@ app = FastAPI(debug=settings.DEBUG)
DATA_ROOT = Path(settings.DATA_ROOT)
if not DATA_ROOT.exists():
DATA_ROOT.mkdir(parents=True)
# 静态文件夹
app.mount(settings.STATIC_URL, StaticFiles(directory=DATA_ROOT), name="static")
# 静态文件夹,这个固定就行了,静态资源都放在这里
app.mount(settings.STATIC_URL, StaticFiles(directory='./static'), name="static")
@app.on_event('startup')