Features: - URL shortener with QR codes, click tracking, deduplication, rate limiting - Pastebin with Markdown rendering, access tokens, raw view - Admin dashboard: dark theme, stats bar, Quick Links tiles with favicons, card-based layout, format/token badges, empty states - CSRF protection, bcrypt auth, in-memory sessions, security headers - Pure-Go SQLite (no CGo), single self-contained binary Deploy: - deploy/install.sh: auto-detects systemd vs SysV init - deploy/urlshort.service: hardened systemd unit - deploy/urlshort.init: SysV init script for older Ubuntu Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
20 lines
407 B
Makefile
20 lines
407 B
Makefile
.PHONY: build build-arm run clean hash
|
|
|
|
build:
|
|
go build -ldflags="-s -w" -o urlshort.exe ./
|
|
|
|
build-linux:
|
|
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o urlshort ./
|
|
|
|
build-arm:
|
|
GOOS=linux GOARCH=arm GOARM=5 go build -ldflags="-s -w" -o urlshort-arm ./
|
|
|
|
run: build
|
|
./urlshort.exe
|
|
|
|
clean:
|
|
rm -f urlshort urlshort.exe urlshort-arm
|
|
|
|
hash:
|
|
@read -p "Password: " pw && go run . --hash-password "$$pw"
|