I, for example, don´t use localhost, but the IP address of a computer on which local server is running (so i can connect through WiFi on a device).