Search code examples
mongodbnode-red

How to connect MongoDB with node-red


I have this flow flow

when I try to deploy my flows I get this message Error: More than 1 database name in URL

Here is my url : mongodb+srv://username:password1234@cluster0.hx0l5.mongodb.net/capteurs?retryWrites=true&w=majority


Solution

  • First if you want to use mongoDB Atlas you must have the latest version of node-red-node-mongodb 0.2.4

    Second you must properly configure your mongodb flow

    Here is an example

    node-red flow

    Host we must fill in the name of the cluster example cluster0.hx0l5.mongodb.net

    database the name of your database example mydatabase

    username your username

    password your password