DEV Community

Daniel Marlow
Daniel Marlow

Posted on • Edited on

2

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.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay