A simple http server written in Rust, backed by SQLite, that renders an SVG image with a dynamic hits counter.
Run:
docker run --rm -v hits_data:/app/data -p 8088:8088 -it neslinesli93/hits-rs
Clone the repo:
$ git clone /~https://github.com/neslinesli93/hits-rs
Build the binary:
$ cargo build --release
(Optional) Copy the .env.example
file to .env
and edit the environment variables if needed
Run the server:
$ ./target/release/hits-rs
After launching the server, it will create a hits.db
SQLite database inside data/
and start listening on 0.0.0.0:8088
, serving the hits counter on /hits.svg
.
Open http://localhost:8088/hits.svg and check it out!
lower
Decides whether to show the hits
text in lowercase. Defaults to false.
The address on which the http server listens to incoming requests. Defaults to 0.0.0.0
The port on which the http server listens to incoming requests. Defaults to 8088
The route registered on the http server to serve the image of the badge. Defaults to /hits.svg