Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumNodeJSgraceful shutdown handlingSingle-choice MCQ

On SIGTERM you call server.close(callback) on an http.Server that currently has one in-flight request still being processed. What is the behavior?

const server = http.createServer(handler); // ... later, on SIGTERM: server.close(() => console.log('closed'));