Created
June 23, 2016 12:03
-
-
Save joedaniels29/062693a3b381db3cf4348566bf690f2b to your computer and use it in GitHub Desktop.
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
function startServersR(){ | |
if [[ -z $1 ]]; then | |
echo "No port Supplied. Default to 3000/4000"; | |
1=0; | |
fi | |
rails s -p$(expr 3000 + $1) & | |
} | |
function startServersE(){ | |
if [[ -z $1 ]]; then | |
echo "No port Supplied. Default to 3000/4000"; | |
1=0; | |
fi | |
cd frontend | |
ember s --port $(expr 4000 + $1) --proxy http://$(hopkins_current_host):$(expr 3000 + $1)/& echo $! > .ember.pid | |
1 | |
} | |
function startServers(){ | |
if [[ -z $1 ]]; then | |
echo "No port Supplied. Default to 3000/4000"; | |
1=0; | |
fi | |
startServersR $1 | |
startServersE $1 | |
openChromeLocalPort $(expr 4000 + $1) | |
} | |
openChromeAddress(){
open -a "Google Chrome" $1
}
openChromeLocalPort(){
if [ -f .root_address ];
then
openChromeAddress "http://d29.rad.jhmi.edu:${1}/${cat .path_extension}"
else
openChromeAddress "http://d29.rad.jhmi.edu:${1}/"
fi
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
startServers 123