How to get the ip address of your localhost on a mac
If you need to use the ip address of your mac instead of using localhost, here is an easy way to find the ip address of your mac via the command line.
Just run the following command in your terminal
ifconfig | grep broadcast
In the output that follows, the place that I have marked as [ip address] is your local ip address
inet [ip address] netmask 0xfffff000 broadcast 22.214.171.124