This projects provides web service that allows users to either shorten a URL or retrieve the stretched version of a shortened one.
Follow these steps to get started:
-
Git-clone this repository.
$ git clone git://github.com/tioback/url-shortener.git url-shortener
-
Change directory into your clone:
$ cd url-shortener
-
Launch SBT:
$ sbt
-
Compile everything and run all tests:
> test
-
Start the application:
> re-start
-
Use a REST Client to use the system through http://localhost:8080
-
To shorten, do a POST request to http://localhost:8080/encurte/url and with a json:
{ "longUrl": "http://www.chaordic.com” }
-
To stretch, do a GET request to http://localhost:8080/url?shortUrl=http://chrdc.co/a
-
Stop the application:
> re-stop