|
Lines 25-30
use Plack::App::CGIBin;
Link Here
|
| 25 |
use Plack::App::Directory; |
25 |
use Plack::App::Directory; |
| 26 |
use Plack::App::URLMap; |
26 |
use Plack::App::URLMap; |
| 27 |
|
27 |
|
|
|
28 |
use Mojo::Server::PSGI; |
| 29 |
|
| 28 |
# Pre-load libraries |
30 |
# Pre-load libraries |
| 29 |
use C4::Boolean; |
31 |
use C4::Boolean; |
| 30 |
use C4::Branch; |
32 |
use C4::Branch; |
|
Lines 60-75
my $opac = Plack::App::CGIBin->new(
Link Here
|
| 60 |
root => '/usr/share/koha/opac/cgi-bin/opac' |
62 |
root => '/usr/share/koha/opac/cgi-bin/opac' |
| 61 |
)->to_app; |
63 |
)->to_app; |
| 62 |
|
64 |
|
| 63 |
# my $api = Plack::App::CGIBin->new( |
65 |
my $apiv1 = builder { |
| 64 |
# root => '/usr/share/koha/api/' |
66 |
my $server = Mojo::Server::PSGI->new; |
| 65 |
# )->to_app; |
67 |
$server->load_app('/usr/share/koha/api/v1/app.pl'); |
|
|
68 |
$server->to_psgi_app; |
| 69 |
}; |
| 66 |
|
70 |
|
| 67 |
builder { |
71 |
builder { |
| 68 |
|
72 |
|
| 69 |
enable "ReverseProxy"; |
73 |
enable "ReverseProxy"; |
| 70 |
enable "Plack::Middleware::Static"; |
74 |
enable "Plack::Middleware::Static"; |
| 71 |
|
75 |
|
| 72 |
mount '/opac' => $opac; |
76 |
mount '/opac' => $opac; |
| 73 |
mount '/intranet' => $intranet; |
77 |
mount '/intranet' => $intranet; |
| 74 |
# mount '/api' => $api; |
78 |
mount '/api/v1/app.pl' => $apiv1; |
| 75 |
}; |
79 |
}; |
| 76 |
- |
|
|