Open Jkwok0714 opened 2 months ago
Alternatively, package into a Tauri project. This may make it more accessible to users not familiar with node.
The Tauri project should simply control the node server, which is packaged by something like pkg
.
use std::process::{Command, Child};
fn start_node_server() -> std::io::Result<Child> {
let child = Command::new("./bin/your_node_app_executable")
.spawn()?;
Ok(child)
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![start_node_server])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
import { invoke } from '@tauri-apps/api/tauri';
async function startServer() {
try {
await invoke('start_node_server');
console.log('Server started successfully');
} catch (e) {
console.error('Failed to start server:', e);
}
}
Could be both, the node server may start a web server to configure the names, etc.
A small web UI to show what bots are up to and their locations. Updates from bot on an interval.
May add option to recall them to home point or manually set a home point.