From 745f83e2e706ef79026430d9fe2aa35518e947dc Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sat, 11 Apr 2020 18:10:00 -0400 Subject: [PATCH] run: Add DEBUG mode that disables webpack Most of the time I'm debugging the server, I don't actually run/need webpack. So, if DEBUG is set, don't start it! --- lib/Euchre/Dealer.pm | 5 ----- run.sh | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Euchre/Dealer.pm b/lib/Euchre/Dealer.pm index f47cd1c..a067a4f 100644 --- a/lib/Euchre/Dealer.pm +++ b/lib/Euchre/Dealer.pm @@ -73,11 +73,6 @@ sub register_player { my $id = ''.$tx; $PLAYERS{$id} = { id => $id, ws => $tx }; print "Player $id has joined the server\n"; - if ($ENV{DEBUG}) { - use Data::Dumper; - print Dumper(\%PLAYERS); - print Dumper(\%GAMES); - } } # finish handler to cleanup state diff --git a/run.sh b/run.sh index 8feaed2..6f769ea 100755 --- a/run.sh +++ b/run.sh @@ -19,4 +19,8 @@ depends mojo DIR=`dirname $0` cd $DIR -exec mojo webpack ./gloat.pl +if [ -n "$DEBUG" ]; then + exec ./gloat.pl daemon +else + exec mojo webpack ./gloat.pl +fi -- libgit2 1.1.1