# Initialize

{% tabs %}
{% tab title="Commonjs" %}
{% code lineNumbers="true" %}

```javascript
const Dubnium = require('dubnium')
const db = new Dubnium('dirPath', options)
```

{% endcode %}

{% code lineNumbers="true" %}

```javascript
const db = new (require("dubnium"))("dir", options)
```

{% endcode %}
{% endtab %}

{% tab title="ECMAScript" %}
{% code lineNumbers="true" %}

```javascript
import Dubnium from 'dubnium'
const db = new Dubnium('dirPath','ext', options)
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can initialize as many databases as you want
{% endhint %}

### Parameters

<table><thead><tr><th width="197">Name</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>dir</td><td>The path to the directory to store Records.</td><td>String</td><td>true</td></tr><tr><td>options.ext</td><td>Custom file extension (default: <code>json</code>) </td><td>String</td><td>false</td></tr><tr><td>options</td><td>Options</td><td>Object</td><td>false</td></tr><tr><td>options.name</td><td>Database name</td><td>String</td><td>false</td></tr><tr><td>options.force</td><td>Enable force overwriting of a preexisting Record.</td><td>Boolean</td><td>false</td></tr><tr><td>options.versioning</td><td>Read more in <a href="/pages/3HHPjwUPXgwBXF68CseI">Versioning</a>.</td><td>Object</td><td>false</td></tr><tr><td>options.requireRoot</td><td>Functions to require root access to run</td><td>Array</td><td>false</td></tr><tr><td>options.trash</td><td>Dir to trash Records in </td><td>String</td><td>false</td></tr><tr><td>options.metadata</td><td>Set to false to disable metadata tracking</td><td>Bool</td><td>false</td></tr></tbody></table>


---

# 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://db.coolstone.dev/4/core/initialize.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.
