node-red-contrib-storage-mongo
v1.0.4
Published
Calls a MongoDB collection method based on the selected operator (Find or Insert)
Downloads
16
Maintainers
Readme
node-red-contrib-storage-mongo
Configs
To inform the URL, pass by the environment variable 'DB_URL' or msg.db_url To inform the DATABASE, pass by the environment variable 'DB_DATABASE' or msg.db_database To inform the COLLECTION, pass by the environment variable 'DB_COLLECTION' or msg.db_collection
Input
Calls a MongoDB collection method based on the selected operator.
Find queries a collection using the msg.query
as the query statement as per the .find() function.
Optionally, you may also set
- a
msg.sort
object, - a
msg.limit
number
The result is returned in msg.payload
.
Insert creates a new obj with the configured properties and inserts in the database.
License
The node is available as open source under the terms of the MIT License.