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 1e932b48215a8f45c96877a6b7a77541fe43236b (patch)
parent f814675bd1650039e06577ef7687b2861f76e16a
Author: Alex Karle <alex@alexkarle.com>
Date:   Sat, 18 Jul 2020 14:55:29 -0400

gloat: Improve MOJO_MODE handling to allow -m CLI flag

The default server takes -m MODE as a replacement for the MOJO_MODE
environment variable.

Both -m and MOJO_MODE impact app->mode(). To allow deployment in a
sterile environment (via the -m flag), we need to update to use
app->mode() instead of $ENV{MOJO_MODE}.

Diffstat:
Mgloat.pl | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gloat.pl b/gloat.pl @@ -23,7 +23,7 @@ get '/' => sub { get '/game' => sub { my $c = shift; - if ($ENV{MOJO_MODE} && $ENV{MOJO_MODE} eq 'production') { + if (app->mode() eq 'production') { $c->reply->static('prod.html'); } else { $c->reply->static('preprod.html');