| Conditions | 2 |
| Paths | 10 |
| Total Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 26 | { |
||
| 27 | $this->handleDeprecations($input, $output); |
||
| 28 | $this->setRunTimeOptions($input); |
||
| 29 | |||
| 30 | try |
||
| 31 | { |
||
| 32 | $this->configureConfigurationFile($input); |
||
| 33 | $website = $this->getContainer()->get(Website::class); |
||
| 34 | |||
| 35 | /** @var PageViewRouter $router */ |
||
| 36 | $router = $this->getContainer()->get(PageViewRouter::class); |
||
| 37 | |||
| 38 | $loop = Factory::create(); |
||
| 39 | $socket = new \React\Socket\Server('0.0.0.0:8000', $loop); |
||
| 40 | |||
| 41 | $server = DevServer::create($router, $website->getCompiler()); |
||
| 42 | $server->listen($socket); |
||
| 43 | |||
| 44 | $output->writeln('Listening on ' . str_replace('tcp:', 'http:', $socket->getAddress())); |
||
| 45 | |||
| 46 | $loop->run(); |
||
| 47 | } |
||
| 48 | catch (\Exception $e) |
||
| 49 | { |
||
| 50 | $output->writeln($e->getMessage()); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |