diff --git a/src/Server.php b/src/Server.php index b633242..9ac8122 100644 --- a/src/Server.php +++ b/src/Server.php @@ -135,14 +135,19 @@ private function findExecutable(): string private function buildServeCommand(): array { - return [ + $command = [ $this->findExecutable(), '-S', $this->configuration['host'].':'.$this->configuration['port'], '-t', $this->configuration['root'], - $this->configuration['router'], ]; + + if($this->configuration['router'] != null) { + array_push($command, $this->configuration['router']); + } + + return $command; } private function buildPassingEnvVarArray(): array