Skip to content

minhkashyu/fcc-urlshortener-microservice

Repository files navigation

URL Shortener Microservice

The solution link is https://mks-fcc-urlshortener-microservice.glitch.me.

Example Usage

https://mks-fcc-urlshortener-microservice.glitch.me/api/shorturl/1

Will Redirect to

https://forum.freecodecamp.org/

Test Cases

  • You should provide your own project, not the example URL.

  • You can POST a URL to /api/shorturl and get a JSON response with original_url and short_url properties. Here's an example: { original_url : 'https://freeCodeCamp.org', short_url : 1}

  • When you visit /api/shorturl/<short_url>, you will be redirected to the original URL.

  • If you pass an invalid URL that doesn't follow the valid http://www.example.com format, the JSON response will contain { error: 'invalid url' }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published