# Database

All commands can be found here: <https://enmap.evie.dev/v/3/>

You can access the database through the module (1) or on startup in the constructor (2)

```javascript
// 1
const database = require("js-spring").database;

// 2
const { database } new SpringJS({ name: "test" });
```

{% hint style="info" %}
We recommend for multiple files by starting up in a main file and accessing the database using the first method
{% endhint %}

## Example usage

```javascript
const SpringJS = require("js-spring");
const { database } new SpringJS({ name: "test" });

database.set("DanCodes", "Spring.js");

console.log("DanCodes wrote " + database.get("DanCodes") + "!");
```


---

# 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://spring.js.org/database.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.
