When lightship runs in local mode it uses a random port but does not have any way of identifying what port this is so it's not possible to know what port to check on if you want to confirm its behaviour during development. Other than adding extra code to disable the Kubernetes detection.
Things that should probably be added:
In the log output include where the server is listening on
In the return object include the string returned by app.listen
A bit of a tangent. Personally I'd like to put my readiness/liveliness probes on the same port as my Prometheus metrics. And then output something like the Next.js dev server's header with the URLs to these.
So I would be equally happy with the ability to provide createLightship with the Fastify app to use instead of having it run createFastify and app.listen internally.
When lightship runs in local mode it uses a random port but does not have any way of identifying what port this is so it's not possible to know what port to check on if you want to confirm its behaviour during development. Other than adding extra code to disable the Kubernetes detection.
Things that should probably be added:
app.listen
A bit of a tangent. Personally I'd like to put my readiness/liveliness probes on the same port as my Prometheus metrics. And then output something like the Next.js dev server's header with the URLs to these.
So I would be equally happy with the ability to provide
createLightship
with the Fastifyapp
to use instead of having it runcreateFastify
andapp.listen
internally.