ImanKahlila / ProjectHunt

1 stars 7 forks source link

Adding changes made to correct the error for Loading .env file #35

Closed Saviour-Dagadu closed 1 year ago

Saviour-Dagadu commented 1 year ago

In the sever.js file, we have on line 8 as dotenv.config({ path: "./config/config.env" }); and this throw an error when trying to connect to your database so I want to change it to require("dotenv").config({ path: "./config/.env" }); which makes it easier to connect to your MongoDB once you have your connection string right.

jeramief commented 1 year ago

We were having everyone name their .env file config.env. And avoid adding your personal env.

jeramief commented 1 year ago

Let me know if you need help getting your file to work or anything else and I'll do what I can.