Hey there!
linux@linux-desktop:~/Templates/browsersync-project$ ls
brow.html css
linux@linux-desktop:~/Templates/browsersync-project$ browser-sync start --server --files="css/*.css"
[BS] Access URLs:
------------------------------------
Local: http://localhost:3000
External: http://192.168.1.2:3000
------------------------------------
UI: http://localhost:3001
UI External: http://192.168.1.2:3001
------------------------------------
[BS] Serving files from: ./
[BS] Watching files...
In browser (Firefox http://localhost:3000/) I see only : Cannot GET/
any suggestions?
Interesting! When I rename bower.html to index.html I had no troubles, but why custom naming html file (in my case bower.html) get Cannot GET )
@dagolinuxoid I guess is because it looks for index as a normal server would? try with startPath example in gulpfile:
gulp.task('browser-sync', function() {
browserSync({
server: {
baseDir: "./"
},
startPath: "/html"
});
});
@dagolinuxoid it looks for an index.html file in the directory you specify (or the cwd, if you didn't)
solutions:
index option like sobrowser-sync start --server --index bower.html --files="css/*.css"
Got it, thanks a lot!
Thanks, i solve it follow your answer
Thanks!
Thanks guys
Most helpful comment
@dagolinuxoid it looks for an
index.htmlfile in the directory you specify (or the cwd, if you didn't)solutions:
indexoption like so