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

# readData

Read all data in a database

When you log the object with the database data, you can log it for an example or use it in your code.

{% code title="example.js" lineNumbers="true" %}

```javascript
const { LocalServer, getLocalServer, saveData } = require('naturesaving');
const ExampleSchema = require('path-to-schema') // The path to your schema

const server = new LocalServer({ name: 'Example', path: './database' });

const allData = readData({
    server: server,
    schema: ExampleSchema
)};
```

{% endcode %}
