Skip to content

Commit

Permalink
Merge branch 'jn/maint-instaweb-plack-fix' into maint
Browse files Browse the repository at this point in the history
* jn/maint-instaweb-plack-fix:
  git-instaweb: Change how gitweb.psgi is made runnable as standalone app
  • Loading branch information
gitster committed Apr 3, 2011
2 parents 625589b + 20e7ab8 commit 7a4750a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-instaweb.sh
Expand Up @@ -558,12 +558,14 @@ my \$app = builder {
# make it runnable as standalone app,
# like it would be run via 'plackup' utility
if (__FILE__ eq \$0) {
if (caller) {
return \$app;
} else {
require Plack::Runner;
my \$runner = Plack::Runner->new();
\$runner->parse_options(qw(--env deployment --port $port),
"$local" ? qw(--host 127.0.0.1) : ());
"$local" ? qw(--host 127.0.0.1) : ());
\$runner->run(\$app);
}
__END__
Expand Down

0 comments on commit 7a4750a

Please sign in to comment.