{ N } and LOCALHOST development


Hey there…

My backend is running on http://localhost:3000/.
For android development I am using an emulator created with AndroidStudio (AVD manager).
For ioS development I am using an emulator created with XCode.

What would be the best approach to enable http requests to the localhost in web/ios/android?
I would like to know the best approach to develop for all ‘systems’.

I am asking because I have the following error in android:
System.err: java.net.ConnectException: Failed to connect to localhost/



You’d need to use a different address to access the local dev machine - is the default.

More info at the SO thread https://stackoverflow.com/a/5806384/6408287


One excellent tool I’ve found to simplify this process is ngrok. It’s a simple command line tool that creates a secure tunnel to your localhost and provides you with https/http connection urls. It even provides live logging for requests to the address.