Skip to content

Cannot GET/ #699

@dagolinuxoid

Description

@dagolinuxoid

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?

Activity

dagolinuxoid

dagolinuxoid commented on Jun 30, 2015

@dagolinuxoid
Author

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 )

CydGoblin

CydGoblin commented on Jun 30, 2015

@CydGoblin

@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"
  });
});
shakyShane

shakyShane commented on Jun 30, 2015

@shakyShane
Contributor

@dagolinuxoid it looks for an index.html file in the directory you specify (or the cwd, if you didn't)

solutions:

  1. either use an index.html
  2. use the index option like so
browser-sync start --server --index bower.html --files="css/*.css"
dagolinuxoid

dagolinuxoid commented on Jun 30, 2015

@dagolinuxoid
Author

Got it, thanks a lot!

wikilike7

wikilike7 commented on May 24, 2016

@wikilike7

Thanks, i solve it follow your answer

alexfrize

alexfrize commented on Oct 4, 2016

@alexfrize

Thanks!

VladislavUrbanovich

VladislavUrbanovich commented on Nov 27, 2017

@VladislavUrbanovich

Thanks guys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shakyShane@wikilike7@CydGoblin@dagolinuxoid@alexfrize

        Issue actions

          Cannot GET/ · Issue #699 · BrowserSync/browser-sync