Using environment variables in mongo db node

Hello, I have created a flow which is having mongo db node-red-contrib-mongodb2 node .
So, I have set environment variables in settings.js file as
process.env.host="127.0.0.1";
process.env.port = 27017;
process.env.database="test;

I want to use these environment variables inside mongo db 2 node. How can do that?

Not sure why you have started a new thread.

Like I explained with a link to the docs and a screenshot in the other thread : Node properties stored in external json file - #11 by Steve-Mcl

Ps, I would not use port and host as they may conflict with node-red. I'd use mongo_host and mongo_port

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.