react-webpack-rails-tutorial icon indicating copy to clipboard operation
react-webpack-rails-tutorial copied to clipboard

Hot loader server keeps running

Open nhatdao2412 opened this issue 10 years ago • 3 comments

Is there anyway we can terminate hot loader server after terminate rails server? A problem I ran to was that I have to kill all node process everytime I want to restart the whole server

nhatdao2412 avatar Jul 01 '16 15:07 nhatdao2412

I have a script like this one shown here:

https://forum.shakacode.com/t/best-way-to-clear-out-rails-development-processes/252/2?u=justin

justin808 avatar Jul 01 '16 18:07 justin808

export PROCESSES_TO_QUIT='puma rake sidekiq spring rails ruby-debug phantomjs zeus passenger guard resque "node server.js"'

pgr() {
  echo "Finding processes in list: $PROCESSES_TO_QUIT"  
  echo $PROCESSES_TO_QUIT | xargs -n 1 pgrep -fl
}

pgk() {
  echo "Killing processes in list: $PROCESSES_TO_QUIT"  
  echo $PROCESSES_TO_QUIT | xargs -n 1 pkill -fl
}

pgkk() {
  echo "Killing -9 processes in list: $PROCESSES_TO_QUIT"  
  echo $PROCESSES_TO_QUIT | xargs -n 1 pkill -9 -fl
}

justin808 avatar Jul 01 '16 18:07 justin808

awesome. Thank you!

nhatdao2412 avatar Jul 01 '16 18:07 nhatdao2412