mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
0
app/Commands/.gitkeep
Normal file
0
app/Commands/.gitkeep
Normal file
21
app/Commands/ServeCommand.php
Normal file
21
app/Commands/ServeCommand.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Commands;
|
||||
|
||||
use App\Server\Factory;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use LaravelZero\Framework\Commands\Command;
|
||||
|
||||
class ServeCommand extends Command
|
||||
{
|
||||
protected $signature = 'serve';
|
||||
|
||||
protected $description = 'Start the shaft server';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
(new Factory())
|
||||
->createServer()
|
||||
->run();
|
||||
}
|
||||
}
|
||||
24
app/Commands/ShareCommand.php
Normal file
24
app/Commands/ShareCommand.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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))
|
||||
->createClient($this->argument('host'), explode(',', $this->option('subdomain')))
|
||||
->createHttpServer()
|
||||
->run();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user