euchre-live

Euchre web-app for the socially distant family
git clone git://git.alexkarle.com/euchre-live.git
Log | Files | Refs | README | LICENSE

commit 745f83e2e706ef79026430d9fe2aa35518e947dc (patch)
parent 7d005c9883f0da11746f6307d2e82a82ad4235da
Author: Alex Karle <alex@karle.co>
Date:   Sat, 11 Apr 2020 18:10:00 -0400

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!

Diffstat:
Mlib/Euchre/Dealer.pm | 5-----
Mrun.sh | 6+++++-
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git 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 @@ -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