how to check which application is in use port 8080 in mac code example
Example 1: mac terminal find process by port
sudo lsof -i tcp:3000
Example 2: netstat listening port 8080 mac
lsof -nP -iTCP:$PORT | grep LISTEN
sudo lsof -i tcp:3000
lsof -nP -iTCP:$PORT | grep LISTEN