Funny Frontend Funny Frontend - 1 year ago 527
Node.js Question

BrowserSync Cannot GET /

I only have installed NodeJS and BrowserSync with this command:

npm install -g browser-sync

After I use this command to start the server:

λ browser-sync start --server
[BS] Access URLs:
Local: http://localhost:3000
UI: http://localhost:3001
UI External:
[BS] Serving files from: ./

And I get the following error:
Cannot GET /

I'm confused because I want to use BrowserSync with my Laravel project.

Where should I install BrowserSync?


Answer Source

Using BrowserSync as a server only works if you're running a static site, so PHP won't work here.

Looks like you're using XAMPP to serve your site, you can use BrowserSync to proxy your localhost.


browser-sync start --proxy localhost/yoursite


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download