hotfix: finding hotreload path fails when not running under cargo

This commit is contained in:
Jonathan Kelley committed 2024-03-20 09:54:57 -07:00
1 parent e923c6462c
commit 6c9f991f0b
3 files changed
+20 -5

No files matched your search

+3
View File
@@ -441,6 +441,7 @@ pub async fn hot_reload_handler(ws: axum::extract::WebSocketUpgrade) -> impl Int
let mut rx =
tokio_stream::wrappers::WatchStream::from_changes(state.message_receiver.clone());
while let Some(change) = rx.next().await {
if let Some(template) = change {
let template = { serde_json::to_string(&template).unwrap() };
@@ -449,6 +450,8 @@ pub async fn hot_reload_handler(ws: axum::extract::WebSocketUpgrade) -> impl Int
};
}
}
println!("😳 Hot Reload WebSocket disconnected");
})
}