To get started with actual databases, let's look at an extremely lightweight, small-footprint database engine: level. This is a Node.js-friendly wrapper that wraps around the LevelDB engine and was developed by Google. It is normally used in web browsers for local data persistence and is a non-indexed, NoSQL datastore originally designed for use in browsers. The Level Node.js module uses the LevelDB API and supports multiple backends, including leveldown, which integrates the C++ LevelDB database into Node.js.
To install the database engine, run the following command:
$ npm install [email protected] --save
This installs the version of level that the following code was written against.
Then, create the models/notes-level.mjs module, which will contain the AbstractNotesStore implementation:
import util from 'util';
import { Note, AbstractNotesStore } from './Notes...