DEV Community

Discussion on: FullStack setup (Node.js, React.js and MongoDB)

Collapse
 
alsmith808 profile image
Alan Smith

Thanks Thiago, nice tutorial. I notice your code doesn't have 'require('dotenv').config()' or the npm package install in the instructions??

Am I missing something, are you using some native way of reading the .env file, thanks!

Alan

Collapse
 
pacheco profile image
Thiago Pacheco

Hi Alan, thank you.

I am not using a .env file here, I am only using the process.env variables, assuming that the additional custom variables would be defined on the server.

Collapse
 
alsmith808 profile image
Alan Smith

Thanks Thiago,

I think I see what happened, I'm connecting to a db on Mongo Atlas and copied a line of code from another project!! Thanks for looking, cheers.

Alan