Skip to content

Testing Your Local React App Mobile Browser iPhone Android

License

Notifications You must be signed in to change notification settings

karelbecerra/dns-mobile-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Test your local running app from your mobile browser (DNS Mobile React iPhone Android)

Testing Your Local React App Mobile Browser iPhone Android

Install DNS in your Mac

The instructions are for Mac OSX via Homebrew:

brew install dnsmasq

dnsmasq is a lightweight dns server that will fallback to the original DNS server when it encounters an unknown domain

Add the line address=/www.your-domain.com/192.168.86.26 (my Mac ip in this sample) to the file /usr/local/etc/dnsmasq.conf

vi /usr/local/etc/dnsmasq.conf

The IP Address 192.168.86.26 is whatever the IP address assigned to your local computer by your router. You can find this via Network Utility (ifconfig)

sudo brew services restart dnsmasq

This starts dnsmasq process, and it will listen on the DNS ports

Edit your /etc/hosts

sudo vi /etc/hosts

127.0.0.1 yourdomain.com

Set your local computer's IP Address as your DNS Server your iPhone, go to Settings -> Wi-Fi -> Info icon for your connected router -> DNS

IMG_1049

IMG_1050

About

Testing Your Local React App Mobile Browser iPhone Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published