How does PM2 handle port conflicts?

  node.js, question

As we all know, two processes in the same operating system cannot use the same port. Well, PM2 is a load balancing thing, which means that it must have started a multi-threaded process for the same js project and then load balanced it. However, is this not in conflict with the above understanding? If this Js process is a Web application that occupies 3000 ports, is 3000 ports occupied by multiple processes?

According to my understanding, all processes are generally the parent processes that carry out Port monitor and then distribute them to the child processes for processing.
You can use pm2 to start your app, and then see which pid monitor port is it, and see if the process corresponding to that pid is pm2 to verify it.