Closed dmattox10 closed 3 years ago
You are setting environment variables when running node app.js....
That's not the way to do it. Instead you have to edit the configLocal.ts
and enter your mongoUrl
here
Ok, tried it your way, same problem. I knew what I was doing when I edited it to use ENV.
"getaddrinfo EAI_AGAIN mongo","stack":"MongoServerSelectionError: getaddrinfo EAI_AGAIN It's a mongoDB or more likely DNS error. Please refer to their doc why it can't resolve your address.
Following the instructions, this is as far as I can get after hours of fiddling. Ran from the CLI as:
I'm trying to get it working within docker, which gives me a whole different error I won't bother you with as it's an unsupported config, but mongoDB is running in docker, hence the hostname, and I couldn't get the app to read from .env file even after adding the package and code, so I defined everything in the run command. The configLocal.ts is expecting these values to be passed in via process.env, it works, it just doesn't work for long, which I've never encountered.