Skip to content

Commit fe2d5f6

Browse files
Merge pull request #7 from 0PrashantYadav0/main
refactor: comment out dotenv loading logic in database initialization
2 parents 544482a + 4643337 commit fe2d5f6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

internal/config/database.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ import (
77
"os"
88
"time"
99

10-
"github.com/joho/godotenv"
1110
"go.mongodb.org/mongo-driver/mongo"
1211
"go.mongodb.org/mongo-driver/mongo/options"
1312
)
1413

1514
func InitDB() *mongo.Client {
1615

17-
err := godotenv.Load()
16+
// err := godotenv.Load()
1817

19-
if err != nil {
20-
log.Fatal("Error loading .env file")
21-
}
18+
// if err != nil {
19+
// log.Fatal("Error loading .env file")
20+
// }
2221

2322
mongoDB := os.Getenv("MONGO_URI")
2423

0 commit comments

Comments
 (0)