package Catalyst::Script::Server;
-
-BEGIN {
- $ENV{CATALYST_ENGINE} ||= 'HTTP';
- require Catalyst::Engine::HTTP;
-}
-
use Moose;
use MooseX::Types::Common::Numeric qw/PositiveInt/;
use MooseX::Types::Moose qw/ArrayRef Str Bool Int RegexpRef/;
use Catalyst::Utils;
use namespace::autoclean;
-with 'Catalyst::ScriptRole';
+sub _plack_engine_name { 'Standalone' }
-__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?');
+with 'Catalyst::ScriptRole';
has debug => (
traits => [qw(Getopt)],
}
+sub _plack_loader_args {
+ my ($self) = shift;
+ return (
+ port => $self->port,
+ host => $self->host,
+ keepalive => $self->keepalive ? 100 : 1,
+ );
+}
+
sub _application_args {
my ($self) = shift;
return (
$self->port,
$self->host,
{
+ argv => $self->ARGV,
map { $_ => $self->$_ } qw/
fork
keepalive
a restart when modified
(defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
--rdir --restart_directory the directory to search for
- modified files, can be set mulitple times
+ modified files, can be set multiple times
(defaults to '[SCRIPT_DIR]/..')
--sym --follow_symlinks follow symlinks in search directories
(defaults to false. this is a no-op on Win32)