Skip to content

Commit 8fed41c

Browse files
committed
feat: update default port to avoid app conflicts
1 parent c9ca629 commit 8fed41c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/UICommand.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
namespace Leaf\Console;
66

77
use Symfony\Component\Console\Command\Command;
8-
use Symfony\Component\Console\Input\InputArgument;
98
use Symfony\Component\Console\Input\InputOption;
109
use Symfony\Component\Console\Input\InputInterface;
1110
use Symfony\Component\Console\Output\OutputInterface;
12-
use Symfony\Component\Console\Question\ConfirmationQuestion;
1311
use Symfony\Component\Process\Process;
1412

1513
class UICommand extends Command
@@ -21,14 +19,14 @@ protected function configure()
2119
$this
2220
->setHelp('Open up the Leaf CLI GUI')
2321
->setDescription('Start the Leaf CLI GUI process')
24-
->addOption('port', 'p', InputOption::VALUE_OPTIONAL, 'Port to run app on');
22+
->addOption('port', 'p', InputOption::VALUE_OPTIONAL, 'Port to run app on', 3001);
2523
}
2624

2725
protected function execute(InputInterface $input, OutputInterface $output): int
2826
{
29-
$port = $input->getOption('port') ? (int) $input->getOption('port') : 5500;
30-
$uiDirectory = __DIR__ . '/ui/dist';
27+
$port = (int) $input->getOption('port');
3128

29+
$uiDirectory = __DIR__ . '/ui/dist';
3230
$serveCommand = "cd $uiDirectory && php -S localhost:$port";
3331

3432
$process = Process::fromShellCommandline(

0 commit comments

Comments
 (0)