Skip to content

Commit

Permalink
document -e as a middleware configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Nov 24, 2010
1 parent 9916afd commit e7e4eda
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/plackup
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@ non-option argument. (See above)
Evaluate the given perl code as a PSGI app, much like perl's C<-e>
option.

plackup -e 'sub { my $env = shift; return [ ... ] }'

You can also specify C<-e> option with C<.psgi> file path to wrap the
application with middleware configuration from the command line. You
can also use L<Plack::Builder> DSL syntax inside C<-e> code.

plackup -e 'enable "Auth::Basic", authenticator => ...;' myapp.psgi

equals to run the following PSGI application:

use Plack::Builder;
use Plack::Util;

builder {
enable "Auth::Basic", authenticator => ...;
Plack::Util::load_psgi("myapp.psgi");
};

=item -o, --host

The interface a TCP based server daemon binds to. Defauts to undef,
Expand Down

0 comments on commit e7e4eda

Please sign in to comment.