Skip to content

Instantly share code, notes, and snippets.

@zupzup
Created December 2, 2020 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zupzup/fbdb6ec9aecf8065f9d9c20a98207483 to your computer and use it in GitHub Desktop.
Save zupzup/fbdb6ec9aecf8065f9d9c20a98207483 to your computer and use it in GitHub Desktop.
Timeular Webhooks Server
let health_route = warp::path!("health").and_then(health_handler);
warp::serve(
started_tracking_route
.or(stopped_tracking_route)
.or(health_route),
)
.run(([0, 0, 0, 0], 8000))
.await;
Ok(())
}
async fn health_handler() -> WebResult<impl Reply> {
Ok("OK")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment