JOSH is installed very simply through yarn or npm:
npm i @joshdb/core
* OR *
yarn add @joshdb/core
import { Josh } from "@joshdb/core";
/* OR */
const Josh = require("@joshdb/core");
const db = new Josh({ name: "test" });
JOSH itself is written in typescript and builds to cjs and esm formats, so you can use it in any project.
We have removed the
umdbuilds in order to supportesmand any usage of Josh in browser will require a bundler such aswebpackorrollup.
However, JOSH cannot function without a provider, which provides the communication layer between @joshdb/core and the database you're storing data in. Every provider may have its own specific pre-requisites and sub-dependency, so please take care to read the page for the provider you intend to use.
By default Josh will use the @joshdb/map provider, which stores data in memory. This is highly fast but not persistent
See the Providers page and choose one!