ngrok-axum 0.1.1

Serve an Axum app through an ngrok tunnel with one call.
Documentation
1
2
3
4
5
6
7
8
9
10
use axum::{routing::get, Router};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    let app = Router::new().route("/", get(|| async { "hello from ngrok-axum!" }));

    ngrok_axum::serve(app, ngrok_axum::Config::default()).await?;

    Ok(())
}