The easiest way to kill a process by port number on a Mac

Almost every NodeJS developer would be familiar with the error message Error listen EADDRINUSE: address already in use. The message simply means that the application could not start because there is already a process using that port. Here is the easiest way I have found to stop a process running on your Mac that is using a specific port.

  1. Add a new file called stop