Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #3 from Zearin/patch-1

Added syntax highlighting.
  • Loading branch information...
commit 963e8d4235d7b5a8b26ddc51d6bdcaecd79ddfb3 2 parents 76134b4 + 082b419
@tj authored
Showing with 18 additions and 11 deletions.
  1. +18 −11 Readme.md
View
29 Readme.md
@@ -1,4 +1,3 @@
-
# Express Contrib
Adds async configuration support to Express.
@@ -7,30 +6,38 @@
npm:
- $ npm install express-configure
+```bash
+$ npm install express-configure
+```
## Usage
Ever wanted to boot your Express app settings using Redis or a similar key/value store before accepting connections? well now it is easy, all we need to do is `require('express-configure')` which monkey-patches express, and then invoke the optional callback `configure()`.
- app.configure(function(done){
- redis.hgetall('settings', function(err, obj){
- for (var key in obj) app.set(key, obj[key]);
- done();
- });
- });
+```javascript
+app.configure(function(done){
+ redis.hgetall('settings', function(err, obj){
+ for (var key in obj) app.set(key, obj[key]);
+ done();
+ });
+});
- app.listen(3000);
+app.listen(3000);
+```
## Running Tests
First make sure you have the submodules:
- $ git submodule update --init
+```bash
+$ git submodule update --init
+```
Then run the tests:
- $ make test
+```bash
+$ make test
+```
## License
Please sign in to comment.
Something went wrong with that request. Please try again.