Dark

storage

db

Simple database service

Introduction

The DB service is a straightforward key-value and document database which provides persistent storage via a Create Read Update Delete (CRUD) API. It includes feature rich querying and JSON based formatted records for native use in Node.js and or any language. Powering the backend of your apps from anywhere in the world.

How to use

1. Firstly install the Micro node package

npm install @m3o/m3o-node --save

2. To consume any of the Micro APIs requires an API key. This can generated in the admin section. Once this is acquired, you just need to use this within your chosen API. All APIs follow the same pattern which you can see below:

1import m3o from '@m3o/m3o-node';
2
3const client = new m3o.Client({ token: 'INSERT_YOUR_YOUR_M3O_API_KEY_HERE' });
4
5client.call('API_NAME', 'API_METHOD', API_PAYLOAD)
6  .then(response => {
7    console.log(response);
8  });

3. So, for example to consume the method on the DB:

1import m3o from '@m3o/m3o-node';
2
3const client = new m3o.Client({ token: 'INSERT_YOUR_YOUR_M3O_API_KEY_HERE' });
4
5client.call('db', 'Create', {
6  "record": {},
7  "table": ""
8})
9  .then(response => {
10    console.log(response);
11  });

Authors

Asim
Dom

Feedback

Looking for something you can't find??

Let us know