Browser-sync in mobile while local development

SimplifyJS picture SimplifyJS · Jan 12, 2016 · Viewed 10.4k times · Source

How can I view my local dev website in my phone using gulp Browser-sync? I type localhost:3000 in my phones browser but it won't load

Answer

AmitJS94 picture AmitJS94 · Jan 12, 2016

When you run gulp in your terminal you should see :

    [BS] Access URLs:
 --------------------------------------
       Local: http://localhost:3000
    External: http://192.168.10.81:3000
 --------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.10.81:3001

What it means is that your local URL is localhost at port 3000. For external users it will be the external IP [ not the UI one ]. To access from your phone you need to enter the External IP along with its port in your phone's browser.

You can view all your browser-sync settings by visiting the UI IP.

Note : For the external link to work on your phone, your phone and computer should be on the same Wi-Fi Network, only then it will work.