This question already has an answer here:
I have a web application that runs on my macbook on port 3000. I want to test this on a couple of phones and looking up the ip of my macbook eachtime i want to test this is turning to be cumbersome. I wanted a way to do access the web application from these phones by using my macbook's hostname .
➜ ~ti git:(release-us) hostname GM20152.local ➜ ~ti git:(release-us) curl -s gm20152.local:3000 <html><body>You are being <a href="http://gm20152.local:3000/subscriptions">redirected</a>.</body></html>%
But when I try this url (http://gm20152.local:3000) from my other devices - which are connected to the same wifi network as the macbook - The browser cant find the server. I guess this is because the android phone that I am trying this on has no way of mapping this name (GM20152.local) to an ip address (my macbook ) . Whats the best way to accomplish this ?