Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created March 27, 2010 13:54
Show Gist options
  • Save miyagawa/346068 to your computer and use it in GitHub Desktop.
Save miyagawa/346068 to your computer and use it in GitHub Desktop.
Running gitweb.cgi on Plack
# 1. Download git and make gitweb/gitweb.cgi (See gitweb/INSTALL how to set gitweb root etc.)
# 2. Copy this file as gitweb/app.psgi
# 3. cd gitweb; plackup
# 4. Access http://localhost:3000/gitweb.cgi
use Plack::Builder;
use Plack::App::WrapCGI;
use Plack::App::File;
builder {
mount "/gitweb.cgi" => Plack::App::WrapCGI->new(script => "gitweb.cgi")->to_app;
mount "/" => Plack::App::File->new(root => '.')->to_app;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment