URL Shortener Microservice 💙

This service accepts a URL as a parameter and will check whether it follows the valid http://www.example.com format. If the URL is valid, it will return both the original URL and shortened URL in the JSON response. If it is not, the JSON response will contain an error instead. When you visit that shortened URL, it will redirect you to the original link.

Example Creation Usage

Pass the URL to path https://url-shortener-microsrvc.herokuapp.com/new/[URL] as below:

Valid URL example

https://url-shortener-microsrvc.herokuapp.com/new/https://www.github.com

Example Creation Output

Valid URL example JSON response

{
original_url: "https://www.github.com",
shortened_url: "https://url-shortener-microsrvc.herokuapp.com/29183"
}

Usage:

Visiting the shortened URL: https://url-shortener-microsrvc.herokuapp.com/29183 will redirect to:https://www.github.com

Enjoy! 💙