#!/usr/bin/perl
-use lib '/home/rhaas/commitfest/perl-lib';
-use PgCommitFest::Handler;
use strict;
use warnings;
+die "Must set PGCOMMITFEST_ROOT to root directory of installation!\n"
+ if !defined $ENV{'PGCOMMITFEST_ROOT'} || ! -d $ENV{'PGCOMMITFEST_ROOT'};
+unshift @INC, $ENV{'PGCOMMITFEST_ROOT'} . '/perl-lib';
+require PgCommitFest::Handler;
PgCommitFest::Handler::main_loop();
DocumentRoot "BASEPATH/html"
RewriteEngine On
# Need mod_cgid installed and configured to handle .fpl files.
+ DefaultInitEnv PGCOMMITFEST_ROOT BASEPATH
RewriteRule ^/$ BASEPATH/bin/server.fpl
RewriteRule ^/action/ BASEPATH/bin/server.fpl
</VirtualHost>
'patch_comment_delete' => \&PgCommitFest::PatchComment::delete
);
-our $PG = 'dbi:Pg:dbname=commitfest';
-our $PGUSERNAME = 'rhaas';
+our $PG = 'dbi:Pg:dbname=pgcommitfest';
+our $PGUSERNAME = 'pgcommitfest';
our $PGPASSWORD = '';
sub main_loop {
use strict;
use warnings;
-our $ROOT = '/home/rhaas/commitfest';
+die "Must set PGCOMMITFEST_ROOT to root directory of installation!\n"
+ if !defined $ENV{'PGCOMMITFEST_ROOT'} || ! -d $ENV{'PGCOMMITFEST_ROOT'};
+our $ROOT = $ENV{'PGCOMMITFEST_ROOT'};
our $template = Template->new({ 'INCLUDE_PATH' => $ROOT . '/template',
'FILTERS' => { 'htmlsafe' => \&PgCommitFest::WebControl::escape } });
$CGI::POST_MAX = 65536;