multiple test clients

This commit is contained in:
Adam 2024-04-30 02:58:29 -04:00
parent 9f405d9580
commit 40419d5e9f
2 changed files with 21 additions and 0 deletions

16
spawnclients.html Normal file
View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Cards For Humanity Test Clients</title>
</head>
<body style="background-color: #000">
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
<iframe src="http://localhost:3030" style="width: 500px; height: 500px"></iframe>
</body>
</html>

View file

@ -119,6 +119,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let app = Router::new() let app = Router::new()
.route("/", get(index)) .route("/", get(index))
.route("/test", get(spawnclients))
.route("/websocket", get(websocket_handler)) .route("/websocket", get(websocket_handler))
.with_state(app_state); .with_state(app_state);
@ -133,3 +134,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
async fn index() -> Html<&'static str> { async fn index() -> Html<&'static str> {
Html(std::include_str!("../test_client.html")) Html(std::include_str!("../test_client.html"))
} }
async fn spawnclients() -> Html<&'static str> {
Html(std::include_str!("../spawnclients.html"))
}