fixed mantine forms and menu + improvements on dev mode with vite
This commit is contained in:
@@ -16,7 +16,7 @@ async def frontend_debug_proxy(path):
|
||||
httpc = httpx.AsyncClient()
|
||||
req = httpc.build_request("GET",f"http://127.0.0.1:{os.getenv('F_PORT','5173')}/"+path)
|
||||
resp = await httpc.send(req, stream=True)
|
||||
return StreamingResponse(resp.aiter_bytes(),status_code=resp.status_code)
|
||||
return StreamingResponse(resp.aiter_bytes(),status_code=resp.status_code, headers=resp.headers)
|
||||
|
||||
async def react_deploy(path):
|
||||
file_request = os.path.join(REACT_BUILD_DIR, path)
|
||||
@@ -35,10 +35,10 @@ def frontend_deploy(app):
|
||||
while True:
|
||||
data = await ws_b.recv()
|
||||
await ws_a.send_text(data)
|
||||
@app.websocket("/ws")
|
||||
@app.websocket("/")
|
||||
async def websocket_debug_proxy(ws: WebSocket):
|
||||
await ws.accept()
|
||||
async with websockets.connect(f"ws://127.0.0.1:{os.getenv('F_PORT','5173')}/ws") as ws_b_client:
|
||||
async with websockets.connect(f"ws://127.0.0.1:{os.getenv('F_PORT','5173')}/") as ws_b_client:
|
||||
fwd_task = asyncio.create_task(forward_websocket(ws, ws_b_client))
|
||||
rev_task = asyncio.create_task(reverse_websocket(ws, ws_b_client))
|
||||
await asyncio.gather(fwd_task, rev_task)
|
||||
|
||||
Reference in New Issue
Block a user