##JSON configuration files with interpolated values
#Getting started
###Install it
$ npm install json.mustache.js
###Require it
var template = require('json.mustache.js');
###Add your configuration file (i.e. config/sample.json)
{
"test": {
"url": "mongodb://localhost:27017/{{id}}",
"id": "test-db-name"
},
"development": {
"url": "mongodb://localhost:27017/{{id}}",
"id": "hookly-development"
},
"production": {
"url": "mongodb://{{id}}:{{secret}}@sub.mongonodes.com:{{port}}/{{db}}",
"id": "your-username",
"secret": "your-password",
"port": 27074
"db": "your-db"
}
}
###Use it
```javascript
process.env.NODE_ENV = 'production';
var config = template('config-file.json');
config.url
//=> "mongodb://your-username:your-password@sub.mongonodes.com:27074/your-db"