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.
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
)};
Last updated