copy gitweblite soruce code
|
1 |
#!/usr/bin/env perl |
2 | ||
3 |
use strict; |
|
4 |
use warnings; |
|
5 | ||
upgraded Mojolicious to v3.7...
|
6 |
use FindBin; |
update Mojolicious 4.07
|
7 |
BEGIN { unshift @INC, "$FindBin::Bin/../lib" } |
copy gitweblite soruce code
|
8 | |
upgraded Mojolicious to v3.7...
|
9 |
use Getopt::Long qw(GetOptions :config no_auto_abbrev no_ignore_case); |
copy gitweblite soruce code
|
10 | |
update Mojolicious to 4.57
|
11 |
GetOptions |
copy gitweblite soruce code
|
12 |
'f|foreground' => sub { $ENV{HYPNOTOAD_FOREGROUND} = 1 }, |
upgraded Mojolicious to v3.7...
|
13 |
'h|help' => \my $help, |
copy gitweblite soruce code
|
14 |
's|stop' => sub { $ENV{HYPNOTOAD_STOP} = 1 }, |
update Mojolicious to 4.57
|
15 |
't|test' => sub { $ENV{HYPNOTOAD_TEST} = 1 }; |
copy gitweblite soruce code
|
16 | |
update Mojolicious to 4.57
|
17 |
die <<EOF if $help || !(my $app = shift || $ENV{HYPNOTOAD_APP}); |
copy gitweblite soruce code
|
18 |
usage: $0 [OPTIONS] [APPLICATION] |
19 | ||
20 |
hypnotoad script/myapp |
|
21 |
hypnotoad myapp.pl |
|
22 |
hypnotoad -f myapp.pl |
|
23 | ||
24 |
These options are available: |
|
upgraded Mojolicious to v3.7...
|
25 |
-f, --foreground Keep manager process in foreground. |
26 |
-h, --help Show this message. |
|
27 |
-s, --stop Stop server gracefully. |
|
28 |
-t, --test Test application and exit. |
|
copy gitweblite soruce code
|
29 |
EOF |
30 | ||
upgraded Mojolicious to v3.7...
|
31 |
require Mojo::Server::Hypnotoad; |
32 |
Mojo::Server::Hypnotoad->new->run($app); |
|
copy gitweblite soruce code
|
33 | |
update Mojolicious to 4.57
|
34 |
=encoding utf8 |
35 | ||
copy gitweblite soruce code
|
36 |
=head1 NAME |
37 | ||
upgraded Mojolicious to v3.7...
|
38 |
hypnotoad - Hypnotoad HTTP and WebSocket server |
copy gitweblite soruce code
|
39 | |
40 |
=head1 SYNOPSIS |
|
41 | ||
42 |
$ hypnotoad --help |
|
43 |
$ hypnotoad myapp.pl |
|
44 | ||
45 |
=head1 DESCRIPTION |
|
46 | ||
47 |
Start L<Mojolicious> and L<Mojolicious::Lite> applications with the |
|
48 |
L<Mojo::Server::Hypnotoad> web server. |
|
49 | ||
50 |
=head1 SEE ALSO |
|
51 | ||
52 |
L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicio.us>. |
|
53 | ||
54 |
=cut |