line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Kwiki::Simple::Server::HTTP; |
2
|
1
|
|
|
1
|
|
2205
|
use Kwiki::Plugin -Base; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
use mixin 'Kwiki::Installer'; |
4
|
|
|
|
|
|
|
use HTTP::Server::Simple::Kwiki; |
5
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
const class_id => 'simple_server_http'; |
8
|
|
|
|
|
|
|
const config_file => 'simple_server_http.yaml'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub register { |
11
|
|
|
|
|
|
|
my $register = shift; |
12
|
|
|
|
|
|
|
$register->add(command => 'start', |
13
|
|
|
|
|
|
|
description => 'Start a stand-alone kwiki http server'); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub handle_start { |
17
|
|
|
|
|
|
|
my $port = shift || $self->hub->config->simple_server_http_port; |
18
|
|
|
|
|
|
|
my $server = HTTP::Server::Simple::Kwiki->new($port); |
19
|
|
|
|
|
|
|
$server->run(); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__DATA__ |