Merge branch 'master' into master
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user