()
| 152 | |
| 153 | #[actix_web::main] |
| 154 | async fn main() -> std::io::Result<()> { |
| 155 | let gov_conf = GovernorConfigBuilder::default() |
| 156 | .per_second(12) |
| 157 | .burst_size(5) |
| 158 | .finish() |
| 159 | .unwrap(); |
| 160 | |
| 161 | println!("PySpector API started on port 10000!"); |
| 162 | |
| 163 | HttpServer::new(move || { |
| 164 | let cors = Cors::permissive(); |
| 165 | |
| 166 | App::new() |
| 167 | .wrap(cors) |
| 168 | .wrap(Governor::new(&gov_conf)) |
| 169 | .service(scan) |
| 170 | }) |
| 171 | .bind(("0.0.0.0", 10000))? |
| 172 | .run() |
| 173 | .await |
| 174 | } |
nothing calls this directly
no outgoing calls
no test coverage detected