URL Shortener Microservice
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
public
README.md
index.js
package.json

README.md

Author

@jchurst

Created by JC Hurst

Github | CodePen | LinkedIn | Website | E-Mail

URL Shortener Microservice

User stories:

  1. I can pass a URL as a parameter and I will receive a shortened URL in the JSON response.
  2. If I pass an invalid URL that doesn't follow the valid http://www.example.com format, the JSON response will contain an error instead.
  3. When I visit that shortened URL, it will redirect me to my original link.

Example invalid URL:

http://www.flame-chord.glitch.me/new/foo.com

Example creation usage:

http://www.flame-chord.glitch.me/new/http://www.google.com

Example creation output:

{"original_url":"http://www.google.com",
"short_url":"http://www.flame-chord.glitch.me/r1piS7ybz"}

Usage:

http://www.flame-chord.glitch.me/r1piS7ybz

Will redirect to:

http://www.google.com/