rdj68 / marketplace-project

0 stars 0 forks source link

Project issues #2

Closed This-Is-Prince closed 1 year ago

This-Is-Prince commented 1 year ago
  1. You don't need to create separate client please use bloomRPC
  2. go-api-boot comes with mongodb integration, so you don't have to create your own odm.
  3. Please read go-api-boot documentation
  4. authGo please check this project for project structure
rdj68 commented 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.

This-Is-Prince commented 1 year ago

For your information, our 4 microservices is currently running on go-api-boot Which system are you using??

This-Is-Prince commented 1 year ago

Please share which code is outdated?

rdj68 commented 1 year ago

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

rdj68 commented 1 year ago

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.

SaiNageswarS commented 1 year ago

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

rdj68 commented 1 year ago

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.