How to find out which node process is listening on port 3000?

Every now and then it seems that some process will be listening in on the port that another process is trying to use.

This terminal command quickly allows you to check which process is listening to the given port on either Mac OSX or Linux such as Ubuntu.

In this example, we can see that the node process 5557 is listening on port 3000.

To terminate the process, find the PID e.g. 5557 and use the kill command:-

 

 

 

Pretty git log in the terminal

It’s easy to get a graphical git log tree view in the terminal like this:-

Pretty git log screenshot display the este repository commit tree
Pretty git log screenshot display the este repository commit tree

Running the git log command below inside your git project produces similar output to that shown above:-

Using a git config alias, the command can be shortened to make it easier type in the terminal by defining an alias e.g. “tree” (or whatever you want to call it) in the global config.

Now to get the pretty git log tree view, simply type:-