【发布时间】:2018-06-19 07:27:20
【问题描述】:
我需要使用 nodered 将数据存储在 bluemix 上,但我不知道如何设置 mongodb 节点的配置?我搜索了互联网,发现有一个名为“mongolab”的服务,您应该将其添加到您的组织中才能使用mongodb,但我搜索了 mongolab 服务,但没有找到。有没有办法在nodered上配置和使用mongodb?
【问题讨论】:
标签: mongodb ibm-cloud node-red
我需要使用 nodered 将数据存储在 bluemix 上,但我不知道如何设置 mongodb 节点的配置?我搜索了互联网,发现有一个名为“mongolab”的服务,您应该将其添加到您的组织中才能使用mongodb,但我搜索了 mongolab 服务,但没有找到。有没有办法在nodered上配置和使用mongodb?
【问题讨论】:
标签: mongodb ibm-cloud node-red
您应该使用 Compose 中的 mongoDb 服务:https://console.bluemix.net/catalog/services/compose-for-mongodb
请参阅这些文章,了解集成如何与 Compose 和 Mongodb 一起使用: https://www.compose.com/articles/power-prototyping-with-mongodb-and-node-red-2/ https://developer.ibm.com/answers/questions/16740/node-red-and-mongodb.html
以下是链接中的内容:
there's a good demo video involving MongoDB here: https://www.youtube.com/watch?v=f5o4tIz2Zzc
This uses twitter as the source of data to be in put into, and queried from, mongodb, but the principles are the same.
To answer some of your specific questions:
you can use either save or insert for the case you describe. (This page describes the detailed difference
you can pick your own collection name. You can have multiple collections within the database instance you have provisioned.
the mongodb query node can be used to get the data back. The demo video above shows a quick and easy way to get to the data via an http request.
【讨论】: