๐ URL Shortener with LibSQL
๐ API Endpoints:
๐ Shorten URL
POST /shorten
curl -X POST http://localhost:5000/shorten -H "Content-Type: application/json" -d '{"url": "https://example.com"}'
๐ Redirect
GET /<code> - Redirect to original URL
๐ URL Information
GET /info/<code> - Get URL details and statistics
๐ Statistics
GET /stats - Get overall statistics
๐ Recent URLs
GET /recent - Get recently created URLs
โก Features:
- ๐๏ธ Persistent storage with LibSQL
- โฐ Automatic expiration after 10 minutes
- ๐ Click tracking and analytics
- ๐งน Automatic cleanup of expired URLs
- ๐ Production-ready with proper error handling