web-service-epoch-axum

Crates.ioweb-service-epoch-axum
lib.rsweb-service-epoch-axum
version1.5.1
created_at2025-06-26 19:36:41.722468+00
updated_at2025-08-26 17:09:52.515157+00
descriptionWeb service that displays the epoch time by using Axum, Tokio, Rust. The purpose of this is simple testing of our systems.
homepagehttps://github.com/joelparkerhenderson/web-service-epoch-axum
repositoryhttps://github.com/joelparkerhenderson/web-service-epoch-axum
max_upload_size
id1727706
size13,965,285
Joel Parker Henderson (joelparkerhenderson)

documentation

https://github.com/joelparkerhenderson/web-service-epoch-axum

README

Web service epoch axum

documentationsourcellms.txtcrateemail

Web service that displays the epoch time by using Axum, Tokio, Rust.

This is a very simple web service that we use for testing our systems.

Steps

Run the service using the default address 0.0.0.0:8080:

cargo run

Browse https://localhost:8080/epoch

You should see a web page that displays the epoch time in seconds.

Wait a little bit, then use your browser to reload the web page.

You should see the epoch time increase a little bit.

Options

Run the service using an environment variable for a custom bind address:

export BIND="1.1.1.1:1111"
cargo run

Run the service using environment variables for a custom host and port:

export HOST="1.1.1.1"
export PORT="1111"
cargo run

References

Based on free open source software Demo Rust Axum.

Commit count: 14

cargo fmt