Permalink
Browse files

Merge pull request #6 from andrewtch/patch-1

Update Readme.md
  • Loading branch information...
2 parents 139b5cb + 026fa52 commit bc22da9ba294a88183893f31c1beed5bdefd9459 @rjyo committed Jan 4, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 Readme.md
View
@@ -1,4 +1,3 @@
-
# yaml-config
Manage your configuration based on NODE_ENV, all configuration defined with yaml. Shared configuration can be put under `default` key, different settings under each enviroment name.
@@ -33,14 +32,14 @@ In your source code
```javascript
var config = require('yaml-config');
-var settings = config.readConfig('config/app.yaml'); // path from your app root without slash
+var settings = config.readConfig('./config/app.yaml'); // path from your app root without slash
console.log(settings.redis.db); // if NODE_ENV is development, prints 1
```
The `readConfig()` function takes a second parameter as enviroment name, for example
```javascript
-var settings = config.readConfig('config/app.yaml', 'test');
+var settings = config.readConfig('./config/app.yaml', 'test');
console.log(settings.redis.db); // prints 12
```

0 comments on commit bc22da9

Please sign in to comment.