- I can pass a URL as a parameter and I will receive a shortened URL in the JSON response.
- When I visit that shortened URL, it will redirect me to my original link.
https://extwiii-urlshortener.herokuapp.com/new/https://www.google.com
https://extwiii-urlshortener.herokuapp.com/new/https://www.twitter.com
{"originalUrl":"http://www.google.com","shortUrl":"https://extwiii-urlshortener.herokuapp.com/685"}
{"originalUrl":"http://www.twitter.com","shortUrl":"https://extwiii-urlshortener.herokuapp.com/985"}
https://extwiii-urlshortener.herokuapp.com/985
https://twitter.com/
- Node.js
- Express.js
- MongoDB
- Mongoose
- valid-url
Difficulty 🌕🌕🌕🌕🌕🌕🌕🌑🌑🌑