mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 11:25:56 +00:00
13 lines
440 B
Rust
13 lines
440 B
Rust
use std::path::Path;
|
|
|
|
fn main() {
|
|
let path = std::env::args()
|
|
.nth(1)
|
|
.expect("usage: scan <server folder>");
|
|
let root = Path::new(&path);
|
|
let report = coa_core::layout::scan(root).expect("scan failed");
|
|
println!("{}", serde_json::to_string_pretty(&report).unwrap());
|
|
let observed = coa_core::process::observe(root, &report.ports);
|
|
println!("{}", serde_json::to_string_pretty(&observed).unwrap());
|
|
}
|