Closed This-Is-Prince closed 1 year ago
I checked the go API boot code, the odm code is outdated so I used mine also it has environment variables issue. "mongoUri := os.Getenv("MONGO-URI")", a lot of systems don't support "-" in environment variable names, hence I wasn't able to use the code. I was going to issue a PR to the go-api-boot repo.
I'll read the bloomRPC documentation for the client side, I did know about it but then it's discontinued so didn't use it.
For your information, our 4 microservices is currently running on go-api-boot
Which system are you using??
Please share which code is outdated?
Please share which code is outdated?
client, err := mongo.NewClient(mongoOpts) if err != nil { logger.Fatal("Failed to connect to mongo", zap.Error(err)) } ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) err = client.Connect(ctx)
here mongo.NewClient and client is deprecated as per mongo docs
client, err := mongo.Connect(context.TODO(), mongoOpts)
This is the code to connect from the docs
For your information, our 4 microservices is currently running on
go-api-boot
Which system are you using??
I am using ubuntu 22.03LTS and the issue is when i try to upload an env file with dash in variable name it doesn't detect the file. github.com/joho/godotenv I use the following go package for loading .env files.
U can pull go-api-boot to local and change reference of package in mod file for overriding say env variable name convention..
With your solution multiple items are missing... we use go-api-boot to expose services both in grpc port (http/2) and http port (for browser), out of box support for cors, then use async channel based communication in odm
U can pull go-api-boot to local and change reference of package in mod file for overriding say env variable name convention..
With your solution multiple items are missing... we use go-api-boot to expose services both in grpc port (http/2) and http port (for browser), out of box support for cors, then use async channel based communication in odm
Okay I'll do just that. I'm new to golang and grpc so I'll need to study more about grpc to understand the go-api-boot framework and do more complex stuff. Thx for your guidance.