about summary refs log tree commit homepage
path: root/examples/highlight.psgi
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-21 03:19:20 +0000
committerEric Wong <e@80x24.org>2019-01-21 03:30:36 +0000
commit0a04fa7bd38c8f491b429dc7d8578735ca7ca3f4 (patch)
treea9793a4e5bc38c6273ac583ffa859bbdcfd49adf /examples/highlight.psgi
parent69822fef73720cb201bf9cb7f25ed5ea2c4fa10a (diff)
downloadpublic-inbox-0a04fa7bd38c8f491b429dc7d8578735ca7ca3f4.tar.gz
I'll probably expose the PSGI service for cgit;
but it could be useful to others as well.
Diffstat (limited to 'examples/highlight.psgi')
-rw-r--r--examples/highlight.psgi13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/highlight.psgi b/examples/highlight.psgi
new file mode 100644
index 00000000..244b128e
--- /dev/null
+++ b/examples/highlight.psgi
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+#
+# Usage: plackup [OPTIONS] /path/to/this/file
+# A startup command for development which monitors changes:
+#        plackup -I lib -o 127.0.0.1 -R lib -r examples/highlight.psgi
+use strict;
+use warnings;
+use PublicInbox::WwwHighlight;
+use Plack::Builder;
+my $hl = PublicInbox::WwwHighlight->new;
+builder { sub { $hl->call(@_) }; }