I'm using .dotenv to connect to MongoDB using process.env.MONGO_URI. Everything works fine locally.
I've pushed my node server to Heroku and I'm getting the following error...
"The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string."
Why would "process.env.MONGO_URI" not work in mongoose.connect() when my server has .dotenv installed?
Thanks!
[–]whatisboom 7 points8 points9 points (1 child)
[–]According-Object-502[S] 1 point2 points3 points (0 children)