To run:
mvn scala:run
or optionally to run with debugging enabled (on port 5005 by default):
mvn scala:run -Pdebug
To run unit tests:
mvn test
To create a new shortened url:
curl -i {host}:{port}/?url=www.to.shorten
e.g.,
[~] ➔ curl -i "http://localhost:9090?url=https://www.twitter.com"
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 41
{"smally-url" : "localhost:9090\/9h5k1"}
To use a shortened url:
curl -i {host}/{shortened-url}
e.g.,
[~] ➔ curl -i "http://localhost:9090/9h5k1"
HTTP/1.1 302 Found
Location: https://www.twitter.com
Content-Length: 0
Or paste the shortened url into your browser.