1Plack::App::PSGIBin(3)User Contributed Perl DocumentationPlack::App::PSGIBin(3)
2
3
4

NAME

6       Plack::App::PSGIBin - Run .psgi files from a directory
7

SYNOPSIS

9         use Plack::App::PSGIBin;
10         use Plack::Builder;
11
12         my $app = Plack::App::PSGIBin->new(root => "/path/to/psgi/scripts")->to_app;
13         builder {
14             mount "/psgi" => $app;
15         };
16
17         # Or from the command line
18         plackup -MPlack::App::PSGIBin -e 'Plack::App::PSGIBin->new(root => "/path/psgi/scripts")->to_app'
19

DESCRIPTION

21       This application loads .psgi files (or actually whichever filename
22       extensions) from the root directory and run it as a PSGI application.
23       Suppose you have a directory containing "foo.psgi" and "bar.psgi", map
24       this application to "/app" with Plack::App::URLMap and you can access
25       them via the URL:
26
27         http://example.com/app/foo.psgi
28         http://example.com/app/bar.psgi
29
30       to load them. You can rename the file to the one without ".psgi"
31       extension to make the URL look nicer, or use the URL rewriting tools
32       like Plack::Middleware::Rewrite to do the same thing.
33

AUTHOR

35       Tatsuhiko Miyagawa
36

SEE ALSO

38       Plack::App::CGIBin
39
40
41
42perl v5.32.0                      2020-12-02            Plack::App::PSGIBin(3)
Impressum