Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[docs] stylize

  • Loading branch information...
commit beb0becbb9405efbaaa794c469d17798a9fdbb2e 1 parent c7c07ed
Edward Hotchkiss authored
Showing with 17 additions and 13 deletions.
  1. +17 −13 README.md
View
30 README.md
@@ -1,7 +1,7 @@
-# Short [![Build Status](https://secure.travis-ci.org/edwardhotchkiss/short.png)](http://travis-ci.org/edwardhotchkiss/short)
+# short [![Build Status](https://secure.travis-ci.org/edwardhotchkiss/short.png)](http://travis-ci.org/edwardhotchkiss/short)
-> NodeJS URL Shortener backed by MongooseJS w/ Examples
+> Node.JS URL Shortener backed by Mongoose.JS w/ Examples
## Notes migrating to 1.0.0+
@@ -29,23 +29,27 @@ Using short within your own project as an API interface
```javascript
-/*!
- Core Modules
+/**
+ * @list dependencies
*/
var short = require('short')
, URL = 'http://nodejs.org/';
+/**
+ * @description connect to mongodb
+ **/
+
short.connect('mongodb://localhost/short');
short.connection.on('error', function(error){
throw new Error(error);
});
-/*!
- Generate a Shortened URL
- Retrieve URL based on Generated Hash
- */
+/**
+ * @description generate a shortened URL
+ * ... Retrieve URL based on Generated Hash
+ **/
short.generate(URL, function(error, shortURL) {
if (error) {
@@ -63,11 +67,11 @@ short.generate(URL, function(error, shortURL) {
}
});
-/*!
- Generate a Shortened URL with custom data stored on the hashed URL
- Retrieve URL based on Generated Hash and retrieve custom data
- Make sure to use obj.data.toObject() for accessing your custom data
- */
+/**
+ * @description Generate a Shortened URL with custom data stored on the hashed URL
+ * Retrieve URL based on Generated Hash and retrieve custom data
+ * Make sure to use obj.data.toObject() for accessing your custom data
+ **/
var short = require('short')
, URL = 'http://nodejs.org/',
Please sign in to comment.
Something went wrong with that request. Please try again.