# 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*).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wastefuldb.gitbook.io/wastefuldb/constructor-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
