add client receiving base
This commit is contained in:
9
main.py
9
main.py
@@ -85,10 +85,17 @@ def read_file(filepath: str) -> str:
|
||||
@dataclass
|
||||
class StaticFiles:
|
||||
index_html: str = read_file("static/index.html")
|
||||
script_js: str = read_file("static/script.js")
|
||||
|
||||
@app.get("/presentation/")
|
||||
async def presentation_index(_: Request):
|
||||
return HTMLResponse(status_code=200, content=StaticFiles.index_html)
|
||||
return HTMLResponse(status_code=200, content=StaticFiles.index_html, media_type="text/html")
|
||||
|
||||
@app.get("/presentation/script.js")
|
||||
async def presentation_script(_: Request):
|
||||
return HTMLResponse(
|
||||
status_code=200, content=StaticFiles.script_js, media_type="text/javascript"
|
||||
)
|
||||
|
||||
# Endpoints
|
||||
@app.post("/control")
|
||||
|
Reference in New Issue
Block a user