79082851

Date: 2024-10-13 09:52:10
Score: 3.5
Natty:
Report link

in https://uber-go.github.io/fx/get-started/http-server.html

it said

We used fx.Provide to add an HTTP server to the application. The server hooks into the Fx application lifecycle--it will start serving requests when we call App.Run, and it will stop running when the application receives a stop signal. We used fx.Invoke to request that the HTTP server is always instantiated, even if none of the other components in the application reference it directly.

maybe you need run fx.Invoke once?

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: NoBody