# Installation

Use npm command in order to install bh-configuration module:

```bash
npm install [--save] bh-configuration
```

# Read configuration file

The bh-configuration "class" allows to easily load extern JSON files. This object combine itself with bh-section. 

  - constructor(filePath) : if "filePath" is defined, load immediately the file.
  - load(filePath) : load the file described by "filePath".
  - asSection() : return a section object of the loaded file content. Throw an exception is no file is loaded.

# Usage example

```js
var ConfigurationClass = require('bh-configuration');

var test = new ConfigurationClass();

test.load('test.json'); // file path is concatenated to the program path (/var/node/test/ + test.json)

var section = test.asSection();
```
