To access it on your Android, you need to find the computers IP address. If you’d like to give it a try, the AppleScript is available as a Gist on GitHub. 13 Answers Sorted by: 96 The name 'localhost' is just a loopback to your own computer. Saving this as a service enables me to go to Chrome > Services to run the script. If you have a public IP address of 1.2.3.4 and someone hits your node server from the outside then the value for will be '1.2.3.4'. I decided to make my life a little easier by writing an AppleScript that looks at the open tabs in Chrome and Safari then replaces “localhost” (or custom domain) with my current IP address. will return the address of the machine node is running on based on the current connection. To find your IP addresses on a Mac, click the Apple icon in the top-left corner of your screen and go to System Settings. So once you know how to find your IP address Mac security or WiFi problems should bother you much less. This works very well, but it’s tiresome to manually grab the IP address anytime you want to use a VM or share the page with coworkers, especially if you’re on DHCP and don’t have a static IP address. (Note: you must be on the same network or have a public IP address.) If you want to view the page in a VM or on another machine, just swap the domain name with your machine’s IP address. Retrieve system’s local IP address and Network Interfaces/Adapters on Linux, Windows, and macOS (and other BSD-based systems). Why? Because localhost is local to your machine. However, once you cross boundaries into Windows testing (via VMs or separate laptops), localhost will no longer resolve. Viewing the page means using an address such as If you use custom host names (especially easy with the excellent VirtualHostX.app), you may wind up with a localhost address such as This works great when you’re just testing the pages on your Mac’s browsers. How to get the ip address of your localhost on a mac. When developing web pages, I use MAMP.app or my Mac’s built-in Apache.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |