Counts your hits, man.
Find a file
2024-03-17 15:44:50 -07:00
migrations backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00
src split handler into registration fn and count-fetcher 2024-03-17 15:44:50 -07:00
.gitignore backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00
.rustfmt.toml backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00
build.rs backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00
Cargo.lock backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00
Cargo.toml Quiet, clippy! 2024-03-17 15:29:01 -07:00
env.example backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00
LICENSE.md backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00
README.md backend works in theory, but I don't have a way to display the count, and no tests. 2024-03-17 14:57:17 -07:00

Hitman counts your hits, man.

This is a simple webpage hit/visit counter service. To run in development, copy the provided env.example file to .env. By default, it will look for a database file in your home directory called .hitman.db. You can let hitman create it for you, or you can use the sqlx db create command (get by running cargo install sqlx-cli; see https://crates.io/crates/sqlx-cli ); if you do that, don't forget to also run sqlx migrate run, to create the tables. This project uses SQLx's compile-time SQL checking macros, so your DB needs to have the tables to allow the SQL checks to work.

How does it work?

If you wish to use this on your webpage, just add the following lines to the page you want a counter on:

TODO!!!

It uses the referer header to get the page it was called from, and uses that as the key for counting the hit.