54URL Shortener

Write a web application that allows users to take a long URL and convert it to a shortened URL similar to https://goo.gl/.

  • The program should have a form that accepts the long URL.

  • The program should generate a short local URL like /abc1234 and store the short URL and the long URL together in a persistent data store.

  • The program should redirect visitors to the long URL when the short URL is visited.

  • The program should track the number of times the short URL is visited.

  • The program should have a statistics page for the short URL, such as /abc1234/stats. Visiting this URL should show the short URL, the long URL, and the number of times the short URL was accessed.

Constraints

  • This app must use a persistent data store that others can ...

Get Exercises for Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.