I am using node Js, and I want to know if there is a way to make my nodeJs automatically change the PORT if the default one has been used.
for exemple: the default port for my server to run on is 3000. But if that port is already in use, it should maybe ask me if I want to switch port and then look up the first unused port to run on.
Thank you