Skip to content

Commit

Permalink
Allow the host and port to be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Apr 15, 2022
1 parent 9be80eb commit e54a394
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Commands/HydeServeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class HydeServeCommand extends Command
*
* @var string
*/
protected $signature = 'serve';
protected $signature = 'serve {--port=8080} {--host=localhost}';

/**
* The description of the command.
Expand All @@ -41,7 +41,9 @@ public function handle(): int

$this->warn('This feature is experimental. Please report any issues on GitHub.');

passthru('php -S localhost:80 ' . Hyde::path('vendor/hyde/realtime-compiler/server.php'));
$port = $this->option('port');
$host = $this->option('host');
passthru("php -S $host:$port " . Hyde::path('vendor/hyde/realtime-compiler/server.php'));

return 0;
}
Expand Down

0 comments on commit e54a394

Please sign in to comment.