2 # Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
3 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
5 # PublicInbox::Cgit may be used independently of WWW.
7 # Usage (development, with auto-reload):
8 # plackup -I lib -o 127.0.0.1 -R lib -r examples/cgit.psgi
10 # Usage (production, with public-inbox-httpd(1)):
11 # public-inbox-httpd [OPTIONS] /path/to/examples/cgit.psgi
15 use PublicInbox::Cgit;
16 use PublicInbox::Config;
17 my $pi_cfg = PublicInbox::Config->new;
18 my $cgit = PublicInbox::Cgit->new($pi_cfg);
21 eval { enable 'ReverseProxy' };
23 sub { $cgit->call($_[0]) }