Open kevinmamaqi opened 8 years ago
If you enable Vagrant port-forwarding, your VMs ports will be accessible from your host, allowing http://localhost:3000 to be accessible when running browser-sync in your VM.
https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/Vagrantfile#L139
Like @simshanith wrote, you need to uncomment port forwarding in Vagrant file https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/Vagrantfile#L202
and change it to:
config.vm.network "forwarded_port", guest: 80, host: 3000
and then run vagrant reload
or vagrant up
. After that, you can use browser-sync on address websitename.dev:3000
This worked for me on Windows 10 with VVV.
Isn't possible to run Browsersync on the host machine? If so, how?
Issue details
I am running VVV, (just installed) for theme development using gulp altogether with Gulp-BrowserSync (and other npm packages).
In VVV I've created a new WP install called organic with organic.du.dev as URL. It is working fine.
In my gulpfile.js I got the following BrowserSync task:
When I initiate GULP (login via vagrant ssh) in the working folder everything runs and I receive the following message:
[
The problem is that http://localhost:3000 is not accesible from Chrome or Safari and that http://10.0.2.15:3001 is a public (and useless as far as I know) IP. Running ifconfig in vagrant@vvv I receive the following prompt:
and also the working localhost IP, which is:
It took me a while to realise and find what's going on, but the problem is that I still don't understand it. I think that is an error and should be solved.
Steps to reproduce/test case
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
{cli command here}
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync