You're developing a TCP server in Node.js and want to implement error handling for the EADDRINUSE error. You need to listen for the 'error' event on the server object, check if the error code is EADDRINUSE, and then retry listening on the same port after a delay of 1 second.
Rearrange the lines of code below to form a correct program that handles this specific error.