Getting Started

Please read the Introduction section if you haven't already.

Setting up the Database

Requiring the package

const dbLocal = require("db-local");
const { Schema } = new dbLocal({ path: "./databases" });

new dbLocal(config)

Parameter
Default
Description

config

Object (optional) The configuration to use in the database

path

./databases

String (optional)

The path ( from the project root ) where JSON files will be stored

readOnFind

false

Boolean (optional) If true, the database will be read on every find() call

Last updated

Was this helpful?