X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=examples%2Fcgit.psgi;h=48e3798b4e1402e4083bc19fd0321381cda9300e;hb=8862c33ae93eea1af6246cd3c7a81e0a122186bf;hp=3aaa4515243946266cbbacf55bd50e6ff7833200;hpb=95bdac7f09c69036efed537a4d03d5bdd2ae4eb6;p=public-inbox.git diff --git a/examples/cgit.psgi b/examples/cgit.psgi index 3aaa4515..48e3798b 100644 --- a/examples/cgit.psgi +++ b/examples/cgit.psgi @@ -4,25 +4,20 @@ # # PublicInbox::Cgit may be used independently of WWW. # -# Usage: +# Usage (development, with auto-reload): # plackup -I lib -o 127.0.0.1 -R lib -r examples/cgit.psgi +# +# Usage (production, with public-inbox-httpd(1)): +# public-inbox-httpd [OPTIONS] /path/to/examples/cgit.psgi use strict; use warnings; use Plack::Builder; use PublicInbox::Cgit; use PublicInbox::Config; -my $pi_config = PublicInbox::Config->new; -my $cgit = PublicInbox::Cgit->new($pi_config); +my $pi_cfg = PublicInbox::Config->new; +my $cgit = PublicInbox::Cgit->new($pi_cfg); builder { - eval { - enable 'Deflater', - content_type => [ qw( - text/html - text/plain - application/atom+xml - )] - }; eval { enable 'ReverseProxy' }; enable 'Head'; sub { $cgit->call($_[0]) }