GitXplorerGitXplorer
c

smally-scala

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
248212e806a893e34d94fac4ed203d5f14e29f86

Updates

ccacoco committed 12 years ago
Unverified
5de3923bc73fdb9d6a7458a8bcec926cab032994

Updates to make more idiomatic.

ccacoco committed 12 years ago
Unverified
3975fe14a6b7d41b1fab53905f60362ff641f313

Removed junit dependency. Updated gitignore

ccacoco committed 12 years ago
Unverified
61b7c4a3ce6960d7f3a1aaf42e35fa708beac3bf

Updates

ccacoco committed 12 years ago
Unverified
21013bd3b1a189ef59297f265610a31b60b49083

first commit

ccacoco committed 12 years ago

README

The README file for this repository.

smal.ly

Simple URL shortener in Scala using Finagle

Running

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

Using

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.