Files
expose/app/Commands/ShareCommand.php
Marcel Pociot 2778d5a489 wip
2020-04-16 15:30:53 +02:00

27 lines
681 B
PHP

<?php
namespace App\Commands;
use App\Client\Factory;
use Illuminate\Console\Scheduling\Schedule;
use LaravelZero\Framework\Commands\Command;
use React\EventLoop\LoopInterface;
class ShareCommand extends Command
{
protected $signature = 'share {host} {--subdomain=}';
protected $description = 'Share a local url with a remote shaft server';
public function handle()
{
(new Factory())
->setLoop(app(LoopInterface::class))
->setHost('beyond.sh')
->setPort(8080)
->createClient($this->argument('host'), explode(',', $this->option('subdomain')))
->createHttpServer()
->run();
}
}