0.0.3 • Published 3 years ago

monoce v0.0.3

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

Monoce

Modern, fast, simple KV storage.

Installing

Using npm (or yarn):

$ npm install monoce # or yarn add monoce

Example

⚠️ Warning! - Currently, you can create database only this web site: https://www.monoce.com (later you can use self-hosted the Monoce)

Use for TypeScript:

import { MonoceInstance } from 'monoce'

Use for JavaScript:

const { MonoceInstance } = require('monoce')

❗ Worked copy-past example:

const monoce = new MonoceInstance({ database: 'monoce', token: '43d51bef-c1eb-43db-b961-58f4ad9a105e' })

const requestInitialization = async () => {
  const setRequest = await monoce.set({
    document: 'monoce',
    payload: {
      AnyJSONPayload: 'AnyJSONValue'
    }
  })

  console.log(setRequest)
  /** 
   * {
   *  AnyJSONPayload: 'AnyJSONValue'
   * }
  */

  const getRequest = await monoce.get({
    document: 'monoce'
  })

  console.log(getRequest)
  /** 
   * {
   *  AnyJSONPayload: 'AnyJSONValue'
   * }
  */

  const updateRequest = await monoce.update({
    document: 'monoce',
    payload: {
      AnyOtherJSONPayload: 'AnyOtherJSONValue'
    }
  })

  console.log(updateRequest)
  /** 
   * {
   *  AnyJSONPayload: 'AnyJSONValue',
   *  AnyOtherJSONPayload: 'AnyOtherJSONValue'
   * }
  */

  const deleteRequest = await monoce.delete({
    document: 'monoce'
  })

  console.log(deleteRequest)
  /** 
   * {
   *  databse: 'monoce',
   *  document: 'monoce'
   * }
  */

}

requestInitialization()
0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago