jmcilhargey, thanks for the reply. I get now what you were saying. It turns out that the error was caused by something else, but this is something I’ve been confused about also, so your reply is very helpful.
So what you are saying, is that if I run npm i -D dotenv in my command line locally, I won’t have to include dotenv as a dependency?
I’m new to the back end (obviously) and the command line in general, so don’t know what i and -D mean.
I’ve been developing all my back end projects with Atom which has a powershell terminal package, so I’ve running all the command line code locally in Atom, like the git and node commands. I will try running npm i -D dotenv if that will cover the dotenv dependency from now on…
Thanks again.
Edit
Also, when you deploy to heroku, does the NODE_ENV variable automatically change from ‘development’ to ‘production’?
And if anyone wants to see the actual API, the heroku app can be found here.