MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / main

Function main

src/main.rs:154–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152
153#[actix_web::main]
154async 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected