1.0.0 • Published 5 years ago

@fofx/mongodb v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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"
  }
}
1.0.0

5 years ago