feat: client-server mode
This commit is contained in:
parent
171194e99f
commit
a689366324
7 changed files with 119 additions and 28 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -1,6 +1,15 @@
|
|||
use std::env;
|
||||
|
||||
mod app;
|
||||
mod server;
|
||||
mod sysinfo_snapshot;
|
||||
|
||||
fn main() -> Result<(), impl std::error::Error> {
|
||||
app::run()
|
||||
fn main() {
|
||||
match env::args().nth(1).as_deref() {
|
||||
Some("server") => server::run().unwrap(),
|
||||
|
||||
None | Some("client") => app::run().unwrap(),
|
||||
|
||||
Some(s) => panic!("invalid argument: {s}"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue