Compare commits
2 Commits
5119a09c29
...
5beeed465e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5beeed465e | ||
|
|
f9e2f846f6 |
12
app.py
12
app.py
@@ -189,9 +189,17 @@ class Room:
|
||||
rooms: dict[str, Room] = {}
|
||||
|
||||
|
||||
API_ROOT = "http://127.0.0.1:8080"
|
||||
|
||||
|
||||
@app.GET("/")
|
||||
async def home(request):
|
||||
return render("index.html", {"API_ROOT": "http://127.0.0.1:8080"})
|
||||
return render("index.html", {"API_ROOT": API_ROOT})
|
||||
|
||||
|
||||
@app.GET("/<id>")
|
||||
async def home_with_id(request, id):
|
||||
return render("index.html", {"API_ROOT": API_ROOT})
|
||||
|
||||
|
||||
@app.POST("/join/<room_id>")
|
||||
@@ -509,4 +517,4 @@ async def static(request, fn):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(app.run(port=8080))
|
||||
asyncio.run(app.run(port=8989))
|
||||
|
||||
Reference in New Issue
Block a user