8 Aug 2022
SURL - surl.pskll.dev
I got my first url shortener up and running on Vercel. I don’t currently plan to make a second one, but never say never. I used a base62 encoding instead of using an external API to create a shortened URL (surl) because I thought it would be a better learning experience for me. For inspiration and information, Denim Mazuki wrote a really good post on this topic Denim Mazuki. As you can see, instead of a direct redirect, you need to confirm that you want to visit this page. Because it could be used to redirect to a malicious link and you should only use a link you can trust. Maybe I will find a better solution in the future, but I wanted to keep this application simple.
This project is of course written in Typescript and uses Next.js and Redis as database.
You can try it out at the following link surl.pskll.dev