gajus / lightship

Abstracts readiness, liveness and startup checks and graceful shutdown of Node.js services running in Kubernetes.
Other
518 stars 32 forks source link

Cannot test lightship endpoints when running in local mode #70

Open dantman opened 5 months ago

dantman commented 5 months ago

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:

  1. In the log output include where the server is listening on
  2. 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.