Created
January 13, 2018 03:12
-
-
Save de314/07652ae8c947b7975b2d1ab8bd4bd5c9 to your computer and use it in GitHub Desktop.
Start script for browser sync
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
#!/bin/bash | |
# You need to globally install broswser-sync `npm i -g browser-sync` and might need to export the node path | |
# Then you can run `$ bbs` to serve the current directory or `bbs ~/workspace/web/my-project` to specify the base directory | |
SERVER_DIR=${1:-$PWD} | |
echo $SERVER_DIR | |
browser-sync start -s $SERVER_DIR -f $SERVER_DIR --port 3333 --ui-port 3334 --directory --cors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment