fofx-mongodb

1.0.0 • Public • Published

fofx-mongodb

An input/output plugin for MongoDB for fofx

  • type: "mongodb"
  • params (these go in your plugins.json): none.
  • input params (these go in your nano.json input key):
    • connectionString [string] connection string to your mongo cluster (must be cabaple of producing a Change Stream).
    • db [string] which database to connect to.
    • collection [string] trigger the nano on every insert to this collection, with the inserted document as a parameter.
  • output params (these go in your nano.json output key):
    • connectionString [string] connection string to your mongo cluster.
    • db [string] which database to connect to.
    • collection [string] insert the return value as a document to this collection, or documents, if the return value is an array.

Sample plugins.json

["fofx-mongodb"]

Sample nano.json

{
  "input": {
    "type": "mongodb",
    "connectionString": "mongodb+srv://<user>:<password>@host:port/<cluster>",
    "db": "fofxTest",
    "collection": "test"
  },
  "output": {
    "type": "mongodb",
    "connectionString": "mongodb://<user>:<password>@host:port/<cluster>",
    "db": "fofxTest",
    "collection": "test"
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i fofx-mongodb

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

8 kB

Total Files

7

Last publish

Collaborators

  • oakfang