getserviceip 0.1.1

Web service to get IP addresses from devices.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use getserviceip::{run, IpInfo};
use std::net::TcpListener; // Adjust the path to your lib.rs module
use std::sync::{Arc, Mutex};

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    // Bind to a specific address
    let listener = TcpListener::bind("0.0.0.0:8087")?;
    let state = Arc::new(Mutex::new(Vec::<IpInfo>::new()));
    run(listener, state)?.await
}