Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emrekeskinmac/mongodb-service
A MESG Core service to MongoDB
https://github.com/emrekeskinmac/mongodb-service
Last synced: 21 days ago
JSON representation
A MESG Core service to MongoDB
- Host: GitHub
- URL: https://github.com/emrekeskinmac/mongodb-service
- Owner: emrekeskinmac
- Created: 2019-02-17T21:07:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-21T19:58:16.000Z (over 4 years ago)
- Last Synced: 2024-11-18T00:37:16.685Z (about 1 month ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - MongoDB - MongoDB is a NOSQL Database (Database)
README
# MongoDB Service
MongoDB is a NOSQL Database
# Contents
- [Installation](#Installation)
- [Definitions](#Definitions)
- [Tasks](#Tasks)
- [delete](#delete)
- [read](#read)
- [update](#update)
- [write](#write)# Installation
## MESG Core
This service requires [MESG Core](https://github.com/mesg-foundation/core) to be installed first.
You can install MESG Core by running the following command or [follow the installation guide](https://docs.mesg.com/guide/start-here/installation.html).
```bash
bash <(curl -fsSL https://mesg.com/install)
```## Service
Download the source code of this service, and then in the service's folder, run the following command:
```bash
mesg-core service deploy https://github.com/emrekeskinmac/mongodb-service
```# Definitions
# Tasks
## delete
Task key: `delete`
Delete data to collection
### Inputs
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **collectionName** | `collectionName` | `String` | Collection Name |
| **findObject** | `findObject` | `Object` | Data to be deleted |### Outputs
#### failure
Output key: `failure`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **message** | `message` | `String` | An error occurs |#### success
Output key: `success`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **result** | `result` | `Boolean` | When the data is successfully delete |## read
Task key: `read`
Read data to collection
### Inputs
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **collectionName** | `collectionName` | `String` | Collection name |
| **filterObject** | `filterObject` | `Object` | **`optional`** Filter object |
| **findObject** | `findObject` | `Object` | Data to be read |### Outputs
#### failure
Output key: `failure`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **message** | `message` | `String` | An error occurs |#### success
Output key: `success`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **data** | `data` | `Any` | When the data is successfully read |## update
Task key: `update`
Update data to collection
### Inputs
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **collectionName** | `collectionName` | `String` | Collection Name |
| **findObject** | `findObject` | `Object` | Data to be update |
| **updateObject** | `updateObject` | `Object` | New Data |### Outputs
#### failure
Output key: `failure`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **message** | `message` | `String` | An error occurs |#### success
Output key: `success`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **result** | `result` | `Boolean` | When the data is successfully update |## write
Task key: `write`
Write data to collection
### Inputs
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **collectionName** | `collectionName` | `String` | Collection name |
| **saveObject** | `saveObject` | `Object` | Data to be saved |### Outputs
#### failure
Output key: `failure`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **message** | `message` | `String` | An error occurs |#### success
Output key: `success`
| **Name** | **Key** | **Type** | **Description** |
| --- | --- | --- | --- |
| **id** | `id` | `String` | When the data is successfully write |