@dstil/git-persistence
v0.0.7
Published
Git-based storage solution for lowdb.
Downloads
8
Readme
git-persistence
Git-based storage solution for lowdb.
Installation
Install the package with NPM:
$ npm install @dstil/git-persistence
Usage
Example:
import low from "lowdb";
import storage from "@dstil/git-persistence";
low("[email protected]:dstil/test.git", { storage }).then(db => {
// Read value from remote Git repository.
let posts = db.get("posts").value();
// Write value to remote Git repository.
db.get("posts").push({ id: 1, title: "Test" }).value();
});