Newbie: Trouble Understanding BrowserSync

I’m new to Sage and trying to understand BrowserSync. Please correct me if I’m wrong:

  1. BrowserSync, when install, is automatically run when I execute gulp watch
  2. When BrowserSync is running under / with gulp watch and I make a change to my SCSS file, then switch to my browser, it should automatically refresh without me actually hitting refresh. Similarly to AJAX.

Is this correct? I’m not getting this result, or any different results, with it installed and running so I’m not clear what I should be expecting and what is wrong.

Everything you have stated is correct, are you accessing the website via http://localhost:3000?

Thanks for the confirmation. No, I’m using a public facing subdomain which is also the URL I specified in the manifest.json file for devUrl.

I could be wrong, however when I run gulp watch browsersync will create a proxy of my dev domain and proxy it on http://localhost:3000 you can also see if browersync is up and running by accessing it via http://localhost:3001 .

If I’m accessing the website via its dev link it will not be updated via browsersync when I make a change, I could be wrong so don’t hold it against me :stuck_out_tongue:

Thanks @hubsta. So I wouldn’t expect those to work for me because I’m running on a remote web server, not on my local machine.

Any other thoughts?

Thank you!

sorry @s3w47m88 I won’t be able to help you with that, hopefully someone on here has had a similar issue and can help you :sweat_smile:

What hubsta said isn’t wrong. I haven’t tried your exact setup, but you can try putting any URL you like into the devUrl, and BrowserSync will proxy that URL to localhost:3000. You can change the URL, but not sure why you would need to.

If you’re trying to hit the same URL as what you put in devUrl, you’re not hitting BrowserSync so nothing is going to happen. Take a look at the output in your terminal when you run gulp watch, it tells you the URL’s that are available. It also should open a browser window for you to localhost:3000

Okay thank you. It sounds like that’s my issue. I’ll test and get back to this post. Thank you!