mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-15 06:25:56 +00:00
wip
This commit is contained in:
@@ -8,7 +8,7 @@ use React\EventLoop\LoopInterface;
|
|||||||
|
|
||||||
class ServeCommand extends Command
|
class ServeCommand extends Command
|
||||||
{
|
{
|
||||||
protected $signature = 'serve {hostname=localhost} {host=0.0.0.0} {--validateAuthTokens}';
|
protected $signature = 'serve {hostname=localhost} {host=0.0.0.0} {--validateAuthTokens} {--port=8080}';
|
||||||
|
|
||||||
protected $description = 'Start the shaft server';
|
protected $description = 'Start the shaft server';
|
||||||
|
|
||||||
@@ -18,12 +18,13 @@ class ServeCommand extends Command
|
|||||||
$loop = app(LoopInterface::class);
|
$loop = app(LoopInterface::class);
|
||||||
|
|
||||||
$loop->futureTick(function () {
|
$loop->futureTick(function () {
|
||||||
$this->info("Expose server running.");
|
$this->info("Expose server running on port ".$this->option('port').".");
|
||||||
});
|
});
|
||||||
|
|
||||||
(new Factory())
|
(new Factory())
|
||||||
->setLoop($loop)
|
->setLoop($loop)
|
||||||
->setHost($this->argument('host'))
|
->setHost($this->argument('host'))
|
||||||
|
->setPort($this->option('port'))
|
||||||
->setHostname($this->argument('hostname'))
|
->setHostname($this->argument('hostname'))
|
||||||
->validateAuthTokens($this->option('validateAuthTokens'))
|
->validateAuthTokens($this->option('validateAuthTokens'))
|
||||||
->createServer()
|
->createServer()
|
||||||
|
|||||||
Reference in New Issue
Block a user