Skip to content

kendsr/shortURL-ms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener Microservice

Features

Pass a URL as a parameter and receive a shortened URL in the JSON response
Visit the shortened URL and be redirected to the original.
Passing an invalid URL will return an error in the JSON response

Usage:

Creating New Shortened URL:

shorturl-ms.heroku.com/http://www.weather.com

JSON Response:

{"shortURL": "k1mc5FN", "longURL": "http://www.weather.com"}

Passing Shortened URL:

shorturl-ms.heroku.com/k1mc5FN

Redirects to: http://www.weather.com

Install:

NodeJS required

Mongodb required

Clone or download repository to a directory then run "npm install"

    Installs express, ejs, mongoose, mongoose-shortid-nodeps and valid-url

If not running locally two environment variables are required:

    APPURL      = The Url for your application
    
    DATABASEURL = URL for mongodb installation

About

FCC Back-end project - Microservice to provide shortened URL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors