package App::Clifton::Server;
-use aliased 'App::Clifton::ServiceContainer';
+use aliased 'App::Clifton::ConsoleService';
use aliased 'App::Clifton::ConfigLoader';
use Moo;
sub BUILD {
my ($self, $args) = @_;
$args->{loop}->add($self);
- $self->$_ for qw(services);
+ $self->$_ for qw(console_service);
}
has config_file => (is => 'ro', required => 1);
sub _build_config_loader { ConfigLoader->new }
-has services => (is => 'lazy');
+has console_service => (is => 'lazy');
-sub _build_services {
- shift->_new_child(ServiceContainer, {});
+sub _build_console_service {
+ my ($self) = @_;
+ $self->_new_child(ConsoleService, { server => $self });
}
sub reload_config { shift->_do(reload_config => @_) }