diff --git a/go.mod b/go.mod index b910912..45b1619 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/FrosTiK-SD/mongik v0.1.18 github.com/allegro/bigcache/v3 v3.1.0 github.com/gin-gonic/gin v1.9.0 + github.com/joho/godotenv v1.5.1 github.com/lestrrat-go/jwx/v2 v2.0.16 go.mongodb.org/mongo-driver v1.13.1 ) diff --git a/go.sum b/go.sum index 0e6706f..77feecd 100644 --- a/go.sum +++ b/go.sum @@ -56,6 +56,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= diff --git a/main.go b/main.go index 74af1d7..211fe23 100644 --- a/main.go +++ b/main.go @@ -13,9 +13,11 @@ import ( mongikModels "github.com/FrosTiK-SD/mongik/models" "github.com/gin-contrib/cors" "github.com/gin-gonic/gin" + "github.com/joho/godotenv" ) func main() { + godotenv.Load() r := gin.Default() mongikClient := mongik.NewClient(os.Getenv(constants.CONNECTION_STRING), &mongikModels.Config{