The challenge is to build a HTTP-based RESTful API for managing Short URLs and redirecting clients similar to bit.ly or goo.gl. Please include a README with documentation on how to build, and run and test the system.
A Short Url:
- Has one long url
- Permanent; Once created
- Is Unique; If a long url is added twice it should result in two different short urls.
- Not easily discoverable; incrementing an already existing short url should have a low probability of finding a working short url.
Your solution must support:
- Generating a short url from a long url
- Redirecting a short url to a long url within 10 ms.
- Listing the number of times a short url has been accessed in the last 24 hours, past week and all time.
- Persistence (data must survive computer restarts)
Shortcuts
- No authentication is required
- No html, web UI is required
- Transport/Serialization format is your choice, but the solution should be testable via curl
- Anything left unspecified is left to your discretion
- have docker and docker-compose installed
- clone the repo
- navigate to the directory containing the docker-compose.yml file
- run docker-compose up -d --build
- Go to the browser on http://localhost:3000 to reach the app
- OR use postman to reach the endpoints