Created
October 29, 2014 10:29
-
-
Save blake-simpson/440ea8e88771a9c44164 to your computer and use it in GitHub Desktop.
Start a browser-sync server for easy live reload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Browser Sync with NPM | |
$ npm install -g browser-sync | |
Then start the Browser Sync server, point it to the proxy (the real server) and then the port option will be the one you use in the browser. The files argument are the files to watch. | |
$ browser-sync start --proxy "localhost:3000" --port 3003 --files "app/** | |
For more config options: http://www.browsersync.io/docs/command-line/ | |
--files File paths to watch | |
--exclude File patterns to ignore | |
--server Run a Local server (uses your cwd as the web root) | |
--index Specify which file should be used as the index page | |
--startPath Specify the start path for the opened browser | |
--https Enable SSL for local development | |
--directory Show a directory listing for the server | |
--proxy Proxy an existing server | |
--xip Use xip.io domain routing | |
--tunnel Use a public URL | |
--open Choose which URL is auto-opened (local, external or tunnel) | |
--config Specify a path to a bs-config.js file | |
--host Specify a hostname to use | |
--logLevel Set the logger output level (silent, info or debug) | |
--port Specify a port to use | |
--no-notify Disable the notify element in browsers | |
--no-open Don't open a new browser window | |
--no-ghost Disable Ghost Mode | |
--no-online Force offline usage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment