rewrite URL shortener in Rust

This commit is contained in:
2026-07-10 04:46:34 +00:00
parent a250ce4c1d
commit a6e8be7553
16 changed files with 2906 additions and 1102 deletions
+22
View File
@@ -0,0 +1,22 @@
# Public URL, including the optional routing prefix.
base_url = "http://localhost:8080/s"
# Replace this in the deployment-only config.toml. Do not commit real secrets.
api_key = "change-this-secret-key"
host = "0.0.0.0"
port = 8080
db_path = "data/urlshort.db"
# Zero keeps new URLs forever by default.
retention_days = 0
min_short_length = 6
max_short_length = 32
max_url_length = 2048
max_retention_days = 3650
rate_limit_requests = 60
rate_limit_window = 60
# Keep false when the embedded frontend should be served by ushort.
# Set true only when a separate web server serves the frontend files.
production = false