Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joedaniels29/062693a3b381db3cf4348566bf690f2b to your computer and use it in GitHub Desktop.
Save joedaniels29/062693a3b381db3cf4348566bf690f2b to your computer and use it in GitHub Desktop.
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)
}
@joedaniels29
Copy link
Author

startServers 123

@joedaniels29
Copy link
Author

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