fofx-mongodb
v1.0.0
Published
An input/output plugin for MongoDB for [fofx](https://github.com/functzia/fofx)
Downloads
2
Readme
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"
}
}