Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janl/simple-realurl
Node url lengthener
https://github.com/janl/simple-realurl
Last synced: 3 months ago
JSON representation
Node url lengthener
- Host: GitHub
- URL: https://github.com/janl/simple-realurl
- Owner: janl
- License: mit
- Fork: true (lukekarrys/simple-realurl)
- Created: 2015-06-06T12:46:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-06T20:20:45.000Z (over 9 years ago)
- Last Synced: 2024-04-07T01:27:50.914Z (9 months ago)
- Language: JavaScript
- Homepage: http://lukekarrys.github.io/simple-realurl
- Size: 715 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# simple-realurl
[![NPM](https://nodei.co/npm/simple-realurl.png)](https://nodei.co/npm/simple-realurl/)
[![Build Status](https://travis-ci.org/lukekarrys/simple-realurl.png?branch=master)](https://travis-ci.org/lukekarrys/simple-realurl)A simple node module to convert short url's to the original url.
Based off [Manuel van Rijn's original realurl](https://github.com/manuelvanrijn/node-realurl), I created this to remove some dependencies (copypaste) and any global bin files.
## Getting Started
Install the module with: `npm install simple-realurl`
### Within your NodeJS project
```javascript
var realurl = require('realurl');
realurl.get('http://goo.gl/BGV9x', function(error, result) {
// error = null;
// result = "http://github.com/manuelvanrijn/node-realurl";
});realurl.get('http://this-is-not-a-real-url.com/at-all', function(error, result) {
// error = Error('URL resulted in a 404');
// result = null;
});realurl.get('', function(error, result) {
// error = Error('Please specify a short url');
// result = null;
});
```## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt).## Release History
* 2013/04/30 - v0.1.4 - *NEW FORK* - Removed all global, bin and copypaste code.
* 2013/03/19 - v0.1.3 - Async support by @lukekarrys.
* 2012/10/08 - v0.1.2 - Added copy to clipboard support.
* 2012/10/03 - v0.1.1 - Fixed a bug regarding line endings...
* 2012/10/02 - v0.1.0 - Initial release.## License
Copyright (c) 2012 Manuel van Rijn - Licensed under the MIT license.