{"repo":"gajus/lightship","free":true,"listed":false,"github":"https://github.com/gajus/lightship","clone":"git clone https://github.com/gajus/lightship.git","description":"Abstracts readiness, liveness and startup checks and graceful shutdown of Node.js services running in Kubernetes.","language":"TypeScript","stars":532,"topics":["nodejs","kubernetes"],"license":null,"category":"deployment-docker-iac","readme_excerpt":"Lightship 🚢 Abstracts readiness, liveness and startup checks and graceful shutdown of Node.js services running in Kubernetes. Behaviour Creates a HTTP service used to check container probes. Refer to the following Kubernetes documentation for information about the readiness and liveness checks: Pod Lifecycle Configure Liveness and Readiness Probes Local-mode If Lightship detects that it is running in a non-Kubernetes environment (e.g. your local machine) then... It starts the HTTP service on any available HTTP port. This is done to avoid port collision when multiple services using Lightship are being developed on the same machine. shutdownDelay defaults to 0 , i.e. immediately proceed to execute the shutdown routine. Detection of the local-mode can be overridden by setting {detectKubernetes: false} . /health /health endpoint describes the current state of a Node.js service. The endpoint responds: 200 status code, message \"SERVER IS READY\" when server is accepting new connections. 500 status code, message \"SERVER IS NOT READY\" when server is initialising. 500 status code, message \"SERVER IS SHUTTING DOWN\" when server is shutting down. Used for human inspection. /live The endpoint responds: 200 status code, message \"SERVER IS NOT SHUTTING DOWN\". 500 status code, message \"SERVER IS SHUTTING DOWN\". Used to configure liveness probe. /ready The endpoint responds: 200 status code, message \"SERVER IS READY\". 500 status code, message \"SERVER IS NOT READY\". Used to configure readiness","default_branch":null,"files":null,"tree":[],"storefront":"/r/gajus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gajus/lightship/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}