Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,21 @@ The base directories for Browser Sync are `.tmp/serve` and `src` with a priority

As the `bower_components` folder is not located in any of the base paths, a special routes is added for this folder to be addressed by `/bower_components`.

The default Browser Sync port is `3000`, if you ever need to change it, head over to the [gulp/server.js](https://github.com/Swiip/generator-gulp-angular/blob/master/app/templates/gulp/_server.js#L42) file and add the `port` attribute to the *server* variable.
Example below :
```javascript
browserSync.instance = browserSync.init({
startPath: '/',
server: server,
browser: browser,
port: 4000 // Add this line to change the default port
});
```

Last configuration, the `browser` option is used to open the default browser to the root page.

Head over to [Browser Sync list of options](http://www.browsersync.io/docs/options/) for the full list of available configurations for BrowserSync.

### Proxy

Browser Sync is powered by an express server. The API allows us to inject any Express middleware. Behind comments, an example of use of [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) is prepared.
Expand Down