@mongrelapp/mongreljs
v0.0.10
Published
Thanks for using Mongrel!
Downloads
38
Readme
Javascript client for Mongrel
Installing
Using npm:
$ npm install @mongrelapp/mongreljs
Using bower:
$ bower install @mongrelapp/mongreljs
Using yarn:
$ yarn add @mongrelapp/mongreljs
Quick Start:
const mongrelDB = require("@mongrelapp/mongreljs");
const db = mongrelDB({
database: "DATABASE_ID",
token: "API_TOKEN",
});
Get:
db.get("example")
.then((resp) => console.log(resp.value))
.catch(console.error);
Put or Update:
db.put("example", "this is an example value")
.then((resp) => console.log(resp.value))
.catch(console.error);
Delete:
db.delete("example")
.then((resp) => console.log(resp))
.catch(console.error);
Documentation
you can find all the documentation here for the mongrel module