title: Using browser-sync with node.js app
body: <p>I have an existing node app. My Node directory structure is setup like this:</p>
  
  <pre><code>./
    node_modules/
    src/
      views/
        index.html
        ...
      server.js
    test/
    gulpfile.js
    package.json
  </code></pre>
  
  <p>I can successfully start my app my running <code>node ./src/server.js</code> from the root shown above. Once started, I can visit "<a href="http://localhost:3000" rel="noreferrer">http://localhost:3000</a>" in the browser and see the contents of index.html like I am expecting.</p>
  
  <p>I want to speed up my development and I recently learned about <a href="https://www.browsersync.io/" rel="noreferrer">browsersync</a>. In an attempt to include it in my gulp process, I have the following:</p>
  
  <pre><code>var browserSync = require('browser-sync').create();
  
  browserSync.init({
    server: {
      baseDir: './src/',
      server: './src/server.js'
    }
  });
  </code></pre>
  
  <p>When I run gulp, I see the following in the command-line:</p>
  
  <p>BS] Access URLs:</p>
  
  <pre><code> --------------------------------------
         Local: http://localhost:3000
      External: http://[ip address]:3000
   --------------------------------------
            UI: http://localhost:3001
   UI External: http://[ip address]:3001
   --------------------------------------
  </code></pre>
  
  <p>My browser is then opened and it attempts to load <a href="http://localhost:3000" rel="noreferrer">http://localhost:3000</a>. At this point, I see the following error in the browser window:</p>
  
  <pre><code>Cannot GET /
  </code></pre>
  
  <p>What am I doing wrong? I can successfully visit <a href="http://localhost:3000" rel="noreferrer">http://localhost:3000</a> if I start my app using <code>node ./src/server.js</code>, however, its like its not running with BrowserSync. What am I doing wrong?</p>