summaryrefslogtreecommitdiff
path: root/index.pl
diff options
context:
space:
mode:
Diffstat (limited to 'index.pl')
-rw-r--r--index.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.pl b/index.pl
index 31b86a0..b67657f 100644
--- a/index.pl
+++ b/index.pl
@@ -18,8 +18,10 @@ app->attr(
my $self = shift;
my $dbname = 'dbdb';
+ my $host = $ENV{DBDB_HOST} // 'localhost';
+ my $port = $ENV{DBDB_PORT} // '5432';
my $dbh
- = DBI->connect( "dbi:Pg:dbname=$dbname;host=localhost;port=5432",
+ = DBI->connect( "dbi:Pg:dbname=$dbname;host=$host;port=$port",
'dbdb', $ENV{DBDB_PASSWORD}, { RaiseError => 1 } );
return $dbh;