URL Shortener
Every web developer should write an URL Shortener, and here's mine:
What does stand out my shortener from the others? Lets see.
- It Uses MD5 hash of the original URL for a short link.
- It Starts with the first five symbols of the hash.
- If that's taken, it keeps adding more symbols until it finds a unique one.
- This all happens when you save a URL to the database, due to the trigger.
- If the URL's already there, no new record - just updates the timestamp.
- It's simple, efficient, and scales well.
- Frontend is written on Typescripted React