@dstil/git-persistence

Git-based storage solution for lowdb.

Usage no npm install needed!

<script type="module">
  import dstilGitPersistence from 'https://cdn.skypack.dev/@dstil/git-persistence';
</script>

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("git@github.com: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();
});