/url-length-shortener

This tinyUrl is a free tool to shorten a URL or reduce a link. Use our tinyUrl to create a shortened link making it easy to remember.

Primary LanguageHTML

URL - Shortener

Demo link: URL Shortener

This web-app has the following features:

  1. URL shortener Home Page: It provides you an input field in which you can enter your long Url which you want to shorten
  2. Recently Shortened URLs list page: It shows all the recently shortened Urls in a table.
  3. Error Page: It will show you an error page in case you entered a wrong Url.

API Specs:

Get all Urls:

GET /urls/
Sample Response Body:
{
    "zmdKXWB8F": "https://github.com/sanchit2812/url-length-shortener",
    "7xTC-U_ky": "https://github.com/sanchit2812/url-length-shortener/blob/master/app.js"
}
Status: 200, 404 ("No urls present");

Shorten a URL:

POST /urls
Sample Request Body:
{
    "longUrl" : "https://github.com/sanchit2812/url-length-shortener/blob/master/app.js"
}

Get a particular Url:

GET /url/:shortUrlId
Sample Response Body:
{
  "longUrl" : "https://github.com/sanchit2812/url-length-shortener/blob/master/app.js"	
}
(It redirects to the Url's link)
Status: 200, 404 ("This URL is not shortened by our service")