Skip to content

Commit 14b7d12

Browse files
committed
chore: cleanup
1 parent 917a79c commit 14b7d12

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Lightweight URL shortener API service with minimal resource requirements. Average memory consumption is under **20MiB** and single CPU core consumption under 20%.
66

7-
bit is highly performant, achieving in average **3K RPS** with a minimum latency of 56ms (100K requests using 100 connections, [benchmark](docs/SETUP.md#benchmark)).
7+
Performance: Avg **3K reqs/sec**, latency 56ms (100K requests using 100 connections, [benchmark](docs/SETUP.md#benchmark)).
88

99
Self-hosted with [Dokku](docs/SETUP.md#dokku) and [Docker Compose](docs/SETUP.md#docker-compose).
1010

1111
Images available on [Docker Hub](https://hub.docker.com/r/sjdonado/bit/tags).
1212

1313
## Why bit?
14-
It is feature-complete by design. Its strength lies in simplicity, a reliable URL shortener without unnecessary bloat. Bug fixes will continue, but new features aren't planned.
14+
It is feature-complete by design. Its strength lies in simplicity, reliable without unnecessary bloat. Bug fixes will continue, but new features aren't planned.
1515

1616
- Minimal tracking setup: Country, browser, os, referer. No cookies or persistent tracking mechanisms are used beyond what's available from a basic client's request.
1717
- Flexible request forwarding system passes client context to destinations via standard `X-Forwarded-For` and `User-Agent` headers, enabling advanced tracking and integration capabilities when needed.

app/controllers/link.cr

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module App::Controllers
3434
end
3535

3636
link.clicks = [] of App::Models::Click
37+
3738
render_json({"data" => App::Serializers::Link.new(link)}, 201)
3839
end
3940

@@ -71,7 +72,8 @@ module App::Controllers
7172
query = query.order_by("id DESC").limit(limit + 1)
7273

7374
links = Database.all(Link, query)
74-
return paginated_response(links, limit) { |link| App::Serializers::Link.new(link) }
75+
76+
paginated_response(links, limit) { |link| App::Serializers::Link.new(link) }
7577
end
7678

7779
def get
@@ -106,7 +108,8 @@ module App::Controllers
106108
query = query.order_by("id DESC").limit(limit + 1)
107109

108110
clicks = Database.all(Click, query)
109-
return paginated_response(clicks, limit) { |click| App::Serializers::Click.new(click) }
111+
112+
paginated_response(clicks, limit) { |click| App::Serializers::Click.new(click) }
110113
end
111114

112115
def update

0 commit comments

Comments
 (0)