Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Preformatted code style added

  • Loading branch information...
commit 48fb4ab5f72c5a73148f05bb5f621f28f963fb2d 1 parent 47b77a2
@arunoda authored
Showing with 28 additions and 28 deletions.
  1. +28 −28 readme.md
View
56 readme.md
@@ -13,7 +13,7 @@ but also to control the flow of the code as they wish.
Install
---------
-npm install qbox
+ npm install qbox
Usage
-----
@@ -22,37 +22,37 @@ Usage
I need to do some tasks after I connect've connect with the database
-var db = qbox.create();
-
-mydatabase.connect(function() {
- $.start();
-});
-
-$.ready(function() {
- //do something
-});
-
-//at somewhere else in your programme
-$.ready(function() {
- //do some other stuff
-});
+ var db = qbox.create();
+
+ mydatabase.connect(function() {
+ $.start();
+ });
+
+ $.ready(function() {
+ //do something
+ });
+
+ //at somewhere else in your programme
+ $.ready(function() {
+ //do some other stuff
+ });
### Complete After Some Few things happens
I need to do some task after I'm connected to database and registry
-var go = qbox.ready(['db', 'registry']);
-
-mydatabase.connect(function() { go.tick('db'); });
-registry.connect(function() { go.tick('db'); });
-
-go.ready(function() {
- //do something
-});
-
-//timeout after 5 seconds
-go.timeout(5000, function() {
- //show the errors
-});
+ var go = qbox.ready(['db', 'registry']);
+
+ mydatabase.connect(function() { go.tick('db'); });
+ registry.connect(function() { go.tick('db'); });
+
+ go.ready(function() {
+ //do something
+ });
+
+ //timeout after 5 seconds
+ go.timeout(5000, function() {
+ //show the errors
+ });
Browse [Tests](https://github.com/arunoda/qbox/blob/master/tests/qbox.js) for more usage patterns
Please sign in to comment.
Something went wrong with that request. Please try again.