working example on ComponentUI
[catagits/Reaction.git] / script / componentui_fastcgi.pl
CommitLineData
7adfd53f 1#!/usr/bin/perl -w
2
3BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
4
5use strict;
6use warnings;
7use Getopt::Long;
8use Pod::Usage;
9use FindBin;
10use lib "$FindBin::Bin/../lib";
11use ComponentUI;
12
13my $help = 0;
14my ( $listen, $nproc, $pidfile, $manager, $detach );
15
16GetOptions(
17 'help|?' => \$help,
18 'listen|l=s' => \$listen,
19 'nproc|n=i' => \$nproc,
20 'pidfile|p=s' => \$pidfile,
21 'manager|M=s' => \$manager,
22 'daemon|d' => \$detach,
23);
24
25pod2usage(1) if $help;
26
27ComponentUI->run(
28 $listen,
29 { nproc => $nproc,
30 pidfile => $pidfile,
31 manager => $manager,
32 detach => $detach,
33 }
34);
35
361;
37
38=head1 NAME
39
40componentui_fastcgi.pl - Catalyst FastCGI
41
42=head1 SYNOPSIS
43
44componentui_fastcgi.pl [options]
45
46 Options:
47 -? -help display this help and exits
48 -l -listen Socket path to listen on
49 (defaults to standard input)
50 can be HOST:PORT, :PORT or a
51 filesystem path
52 -n -nproc specify number of processes to keep
53 to serve requests (defaults to 1,
54 requires -listen)
55 -p -pidfile specify filename for pid file
56 (requires -listen)
57 -d -daemon daemonize (requires -listen)
58 -M -manager specify alternate process manager
59 (FCGI::ProcManager sub-class)
60 or empty string to disable
61
62=head1 DESCRIPTION
63
64Run a Catalyst application as fastcgi.
65
66=head1 AUTHOR
67
68Sebastian Riedel, C<sri@oook.de>
69Maintained by the Catalyst Core Team.
70
71=head1 COPYRIGHT
72
73This library is free software, you can redistribute it and/or modify
74it under the same terms as Perl itself.
75
76=cut