1.0.4 • Published 9 years ago

snowdrift v1.0.4

Weekly downloads
4
License
GPL
Repository
github
Last release
9 years ago

snowdrift

Alt text

This is a very simple url shortener.

Stores URLs in MongoDB.

Installation

npm install snowdrift -S

Setup & Usage

var snowdrift = require("snowdrift");
snowdrift.config(#mongodb_connection_url#, function(){
    console.log("ready to start shortening");
});

Shorten

store url and generate a unique key

snowdrift.shorten("http://apple.com", function(err, results){
    console.log(results);
});

Unshorten

retrieve url for unique key

snowdrift.unshorten("ortrw", function(err, results){
    console.log(results);
});

###The Results

both methods return json containing key and url properties

 { 
    "key": "ortrw",
    "url": "http://apple.com" 
}
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago