DEV Community

Daniel Marlow
Daniel Marlow

Posted on • Updated on

Lockdown Programming Challenges: 3. URL Shortener

This is the third in the series of lockdown programming challenges I've been posting. The aim is to learn something new, try a new language or tech, practice your skills or just help with boredom under lockdown.

In the first challenge we looked at password complexity. In the second challenge we created simple a password generator. In this third challenge we're going to step it up and create a full application - a URL shortener.

Challenge 3: URL Shortener

Create a web application that takes a full URL and returns a short version.

  • Create a form where the user can enter a long URL
  • Generate a shortened URL (eg. /short1234) and save it in a datastore alongside the long URL
  • Redirect visitors to the long URL when the relative short URL is added to the URL of your web application (eg. mylockdownchallengeurl.com/short1234)

Advanced

  • Count the number of visitors to the short URL
  • Use Redis as your datastore
  • Try a new programming language or web framework
  • Capture the date and time each visit was made to a URL and generate a graph
  • Host your web application on a free cloud service.

Top comments (0)