> For the complete documentation index, see [llms.txt](https://wastefuldb.gitbook.io/wastefuldb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wastefuldb.gitbook.io/wastefuldb/constructor-setup.md).

# Constructor Setup

### Quick Setup

```javascript
const Wasteful = require("wastefuldb");
const db = new Wasteful();
```

***

### Setup w/ Options

```javascript
const Wasteful = require("wastefuldb");
const db = new Wasteful({
    feedback: true,  
    log: { enabled: true, dir: "./logger/" },
    path: `./data/`,
    serial: true,
    kill: true
});
```

#### feedback

When `feedback` is **true**, a message will be logged to the console (*stdout*) either confirming execution or displaying an error.

#### log

The `log` option will generate a text document and catalogs every execution of functions, errors, and the timestamps of when every event occurs.

The option argument can be a straight Boolean, or you can specify a directory you want your log file to be generated in by specifying a `dir` key and enabled the option with an `enabled` key.

#### path

When specifying a directory `path`, whatever given will become the location where functions will create, retrieve, and modify documents. Specifying a `path` has no effect on the log path option.

#### serial

`serial`, or serialization, allows entries to be created without being required to specify an **id** key. While **true**, entries created will have an identifier assigned based on the size of the directory, but you may still specify an identifier which takes priority over serialization identifiers.

#### kill

Setting this option to **true** will cause the current process running the database to terminate, throwing an error to the console (*stderr*). While **false**, the error is simply logged to the console (*stdout*).
