mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Commands;
|
||||
|
||||
use App\Server\Factory;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use LaravelZero\Framework\Commands\Command;
|
||||
use React\EventLoop\LoopInterface;
|
||||
|
||||
|
||||
@@ -9,16 +9,20 @@ use React\EventLoop\LoopInterface;
|
||||
|
||||
class ShareCommand extends Command
|
||||
{
|
||||
protected $signature = 'share {host} {--subdomain=}';
|
||||
protected $signature = 'share {host} {--subdomain=} {--auth=}';
|
||||
|
||||
protected $description = 'Share a local url with a remote shaft server';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
if ($this->option('auth')) {
|
||||
$GLOBALS['expose.auth'] = $this->option('auth');
|
||||
}
|
||||
|
||||
(new Factory())
|
||||
->setLoop(app(LoopInterface::class))
|
||||
->setHost('beyond.sh')
|
||||
->setPort(8080)
|
||||
// ->setHost('beyond.sh') // TODO: Read from (local/global) config file
|
||||
// ->setPort(8080) // TODO: Read from (local/global) config file
|
||||
->createClient($this->argument('host'), explode(',', $this->option('subdomain')))
|
||||
->createHttpServer()
|
||||
->run();
|
||||
|
||||
Reference in New Issue
Block a user