react-webpack-rails-tutorial
react-webpack-rails-tutorial copied to clipboard
Hot loader server keeps running
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
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
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
}
awesome. Thank you!