]> iEval git - gruntmaster-page.git/commitdiff
Connect to $ENV{GRUNTMASTER_DSN} if defined
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 25 Jan 2015 20:33:32 +0000 (22:33 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 25 Jan 2015 20:33:32 +0000 (22:33 +0200)
app.psgi

index a2a62ef716736a5f6b7e293f3c80516a60a7a547..2fcdc0058c1dd19781455ba4fcceca5ce0b8860c 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -15,7 +15,7 @@ use constant AUTH_TIMEOUT => 5 * 60;
 use constant ACCESSLOG_FORMAT => '%{X-Forwarded-For}i|%h %u "%r" %>s %b "%{Referer}i" "%{User-agent}i"';
 use constant CONTENT_SECURITY_POLICY => q,default-src 'none'; script-src 'self' www.google-analytics.com; style-src 'self'; img-src 'self'; connect-src 'self'; frame-src free.timeanddate.com,;
 
-my $db = Gruntmaster::Data->connect('dbi:Pg:');
+my $db = Gruntmaster::Data->connect($ENV{GRUNTMASTER_DSN} // 'dbi:Pg:');
 
 tie my %auth, 'Tie::Hash::Expire', {expire_seconds => 300};
 
This page took 0.021709 seconds and 4 git commands to generate.