Skip to content
This repository

A node.js based in-memory, URL shortener.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 public
Octocat-spinner-32 tests
Octocat-spinner-32 utils Removed some console.log and forced true on valid url. October 31, 2010
Octocat-spinner-32 views
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 apikeys.json
Octocat-spinner-32 app.js
Octocat-spinner-32 node-modules
Octocat-spinner-32 shawties.json


An in-memory URL-shortener written in 100% pure JavaScript à la Node.js.


Clone the repo, then:

  sh node-modules       # Requires
  cd shawtie
  node app.js


node app.js will spin up the shawtie service.

Try a short URL

In your favorite web browser, type:

and you'll be redirected to

Create a short URL

If you want to add a new short url, open up another terminal and in the same directory type

node ./tests/test.js

Returns the json object response (just sample code here, your shortenedUrl may be different):

    "message":"Long URL added to in memory store.",

or use curl

curl -i -H "Accept: application/json" -X POST -d "longurl="

You should receive (or something relatively similar):

    "message":"Long URL added to in memory store.",

If you use the curl route, you'll need to CHMOD on the app.js file so it can write the in-memory store to a file.

CHMOD 777 app.js

Not a fan of command line interfaces? No worries, navigate to here:

To get your own API key.

Then, head over to:

And give it a shot there.


  • npm installation support
  • CouchDB backup
  • Admin GUI
Something went wrong with that request. Please try again.