1pub mod crawl;
2pub mod map;
3pub mod scrape;
4pub mod search;
5
6use axum::{routing::{get, post}, Router};
7
8pub fn create_router() -> Router {
10 Router::new()
11 .route("/api/v1/scrape", post(scrape::scrape_handler))
12 .route("/api/v1/map", post(map::map_handler))
13 .route("/api/v1/crawl", post(crawl::crawl_handler))
14 .route("/api/v1/crawl/stream", post(crawl::crawl_stream_handler))
15 .route("/api/v1/search", post(search::search_handler))
16 .route("/health", get(health_handler))
17}
18
19async fn health_handler() -> &'static str {
20 "ok"
21}