How to stop monitoring after http.createServer?

how to stop listening after http.createServer?

Apr.09,2021

listen for exit events

process.on('exit', (code) => {
  console.log(`About to exit with code: ${code}`);
});

process.exit (1)


snooping stops?
or do you want to stop listening and turn off the service?

if you stop listening, you will be server.listening , if you stop the server, you will have server.close , and document will have

.
Menu