Skip to content

Commit

Permalink
yaml docker branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndeta100 committed Aug 30, 2024
1 parent d4d02ef commit 06ddf05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions scripts/cleanDB.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"context"
"github.com/joho/godotenv"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
Expand All @@ -11,9 +10,9 @@ import (
)

func main() {
if err := godotenv.Load(); err != nil {
log.Fatal(err)
}
//if err := godotenv.Load(); err != nil {
// log.Fatal(err)
//}

mongoURI := os.Getenv("MONGO_DB_URL")
dbName := os.Getenv("MONGO_DB_NAME")
Expand Down
7 changes: 3 additions & 4 deletions scripts/seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/Ndeta100/CamHotelConnect/db"
"github.com/Ndeta100/CamHotelConnect/db/fixtures"
"github.com/Ndeta100/CamHotelConnect/types"
"github.com/joho/godotenv"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"log"
Expand All @@ -17,9 +16,9 @@ import (
)

func main() {
if err := godotenv.Load(); err != nil {
log.Fatal(err)
}
//if err := godotenv.Load(); err != nil {
// log.Fatal(err)
//}
mongo_uri := os.Getenv("MONGO_DB_URL")
dbname := os.Getenv("MONGO_DB_NAME")
ctx := context.Background()
Expand Down

0 comments on commit 06ddf05

Please sign in to comment.