| Crates.io | ogcapi-proxy |
| lib.rs | ogcapi-proxy |
| version | 0.2.0 |
| created_at | 2025-10-31 11:38:52.750561+00 |
| updated_at | 2025-12-12 16:30:02.875497+00 |
| description | OGC API proxy service |
| homepage | |
| repository | https://codeberg.org/OpenGeoMesh/ogcapi-proxy |
| max_upload_size | |
| id | 1909927 |
| size | 87,109 |
This crate provides Tower Services for proxying OGC API Collections.
This is still in early development, is not production ready and will have frequent breaking changes.
use ogcapi_proxy::{CollectionsProxy, routes};
#[tokio::main]
async fn main() {
let collections_proxy = CollectionsProxy::from(vec![
(
"proxied_lakes".to_string(),
"https://demo.pygeoapi.io/stable/collections/lakes".to_string(),
),
(
"proxied_dutch_windmills_id".to_string(),
"https://demo.pygeoapi.io/stable/collections/dutch_windmills".to_string(),
),
]);
let router = routes(collections_proxy).await;
let listener = tokio::net::TcpListener::bind("127.0.0.1:3000")
.await
.unwrap();
println!("listening on {}", listener.local_addr().unwrap());
axum::serve(listener, router).await.unwrap();
}