# ogcapi-proxy
This crate provides [Tower Services](https://docs.rs/crate/tower-service/latest) for
proxying [OGC API Collections](https://ogcapi.ogc.org/).
## Status
This is still in early development, is not production ready and will have frequent breaking changes.
## Example
```no_run
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();
}
```