short
Node.js URL Shortener backed by Mongoose.js
No Callbacks, just Promises!
Installation
$ npm install short
Basic API Usage
Generates a Shortened URL Doc, then retrieves it for demo:
var shortURLPromise short = ; // connect to mongodbshort; shortconnection; // promise to generate a shortened URL.var shortURLPromise = short; // gets back the short url document, and then retrieves itshortURLPromise;
Listing all Shortened URLs in DB:
var listURLsPromise short = ; // connect to mongodbshort; shortconnection; // promise to retrieve all shortened URLslistURLsPromise = short; // output all resulting shortened url db docslistURLsPromise;
Contribute
- Fork
- Clone forked repository
- Add some sweet code
- Tests still passing? Run tests with
npm test
- Add a test if adding a feature
- Pull Request
- Instant Karma!
License (MIT)
Copyright (c) 2011-2013, Edward Hotchkiss.