> For the complete documentation index, see [llms.txt](https://spring.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spring.js.org/database.md).

# 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") + "!");
```
