How to gracefully Shutdown Node.js Server?

Technology CommunityCategory: Node.jsHow to gracefully Shutdown Node.js Server?
VietMX Staff asked 3 years ago

We can gracefully shutdown Node.js server by using the generic signal called SIGTERM or SIGINT which is used for program termination. We need to call SIGTERM or SIGINT which will terminate the program and clean up the resources utilized by the program.