# Getting Started

## Setting up the Database <a href="#setting-up-the-database" id="setting-up-the-database"></a>

### Requiring the package

```javascript
const dbLocal = require("db-local");
const { Schema } = new dbLocal({ path: "./databases" });
```

### new dbLocal(config)

| Parameter  |    Default    | Description                                                                                                                                                                                             |
| ---------- | :-----------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| config     |               | <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a> (optional)<br>The configuration to use in the database</p>                              |
| path       | `./databases` | <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> (optional)</p><p>The path ( from the project root ) where JSON files will be stored</p> |
| readOnFind |    `false`    | <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a> (optional)<br>If true, the database will be read on every find() call</p>             |
