allow user to easily override location with text entry.

This commit is contained in:
2025-09-09 13:43:45 -07:00
parent 49164da105
commit b91fc7b016
7 changed files with 48 additions and 20 deletions
+6 -2
View File
@@ -16,13 +16,17 @@ macro_rules! console_log {
// This is the main entry point called from JavaScript
#[wasm_bindgen]
pub fn test_socktop_connector() {
pub fn test_socktop_connector(server_url: Option<String>) {
console_error_panic_hook::set_once();
// Use provided URL or default
let url = server_url.unwrap_or_else(|| "ws://localhost:3000/ws".to_string());
console_log!("🦀 Starting WASM connector test...");
console_log!("🌐 Connecting to: {}", url);
// Test 1: Create configuration
let config = ConnectorConfig::new("ws://localhost:3000/ws");
let config = ConnectorConfig::new(&url);
console_log!("✅ Config created: {}", config.url);
// Test 2: Test configuration methods