mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
perf: Load frontend resource
This commit is contained in:
+2
-1
@@ -45,11 +45,12 @@ if not os.path.exists(frontend_dist):
|
||||
logging.warning("Please make sure you have built the front-end project")
|
||||
|
||||
else:
|
||||
app.mount("/static", StaticFiles(directory=frontend_dist), name="static")
|
||||
|
||||
@app.get("/", include_in_schema=False)
|
||||
async def read_index():
|
||||
return FileResponse(path=os.path.join(frontend_dist, "index.html"))
|
||||
|
||||
app.mount("/", StaticFiles(directory=frontend_dist), name="static")
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
|
||||
@@ -10,6 +10,7 @@ export default defineConfig(({ mode }) => {
|
||||
console.log(mode)
|
||||
console.log(env)
|
||||
return {
|
||||
base: './',
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
|
||||
Reference in New Issue
Block a user