diff options
Diffstat (limited to 'infrastructure/Console')
-rw-r--r-- | infrastructure/Console/Commands/StartServer.sh | 9 | ||||
-rw-r--r-- | infrastructure/Console/Commands/StartServerCommand.php | 30 | ||||
-rw-r--r-- | infrastructure/Console/Commands/WebSocketServerCommand.php | 37 | ||||
-rw-r--r-- | infrastructure/Console/Kernel.php | 33 |
4 files changed, 0 insertions, 109 deletions
diff --git a/infrastructure/Console/Commands/StartServer.sh b/infrastructure/Console/Commands/StartServer.sh deleted file mode 100644 index f9feaa8..0000000 --- a/infrastructure/Console/Commands/StartServer.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -e -redis-server & -PIDS[0]=$! -sudo php artisan serve --host 0.0.0.0 --port 80 & -PIDS[1]=$! - -trap "sudo kill ${PIDS[*]}" SIGINT - -wait diff --git a/infrastructure/Console/Commands/StartServerCommand.php b/infrastructure/Console/Commands/StartServerCommand.php deleted file mode 100644 index 03ec6f9..0000000 --- a/infrastructure/Console/Commands/StartServerCommand.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Infrastructure\Console\Commands; - -use Illuminate\Console\Command; - -class StartServerCommand extends Command -{ - /** - * The console command name. - * - * @var string - */ - protected $name = 'server'; - - /** - * Execute the console command. - * - * @return void - */ - public function fire() - { - $this->line('Starting server...'); - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - exec("wsl bash infrastructure/Console/Commands/StartServer.sh"); - } else { - exec("bash infrastructure/Console/Commands/StartServer.sh"); - } - } -}
\ No newline at end of file diff --git a/infrastructure/Console/Commands/WebSocketServerCommand.php b/infrastructure/Console/Commands/WebSocketServerCommand.php deleted file mode 100644 index 764e16a..0000000 --- a/infrastructure/Console/Commands/WebSocketServerCommand.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -namespace Infrastructure\Console\Commands; - -use Illuminate\Console\Command; -use Infrastructure\Http\WebSocketController; -use Ratchet\Http\HttpServer; -use Ratchet\Server\IoServer; -use Ratchet\WebSocket\WsServer; - -class WebSocketServerCommand extends Command -{ - /** - * The console command name. - * - * @var string - */ - protected $name = 'websocket'; - - /** - * Execute the console command. - * - * @return void - */ - public function fire() - { - $server = IoServer::factory( - new HttpServer( - new WsServer( - new WebSocketController() - ) - ), - 1337 - ); - $this->line('Starting websocket...'); - $server->run(); - } -}
\ No newline at end of file diff --git a/infrastructure/Console/Kernel.php b/infrastructure/Console/Kernel.php deleted file mode 100644 index 61173ff..0000000 --- a/infrastructure/Console/Kernel.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -namespace Infrastructure\Console; - -use Api\Users\Console\AddUserCommand; -use Illuminate\Console\Scheduling\Schedule; -use Illuminate\Foundation\Console\Kernel as ConsoleKernel; - -class Kernel extends ConsoleKernel -{ - /** - * The Artisan commands provided by your application. - * - * @var array - */ - protected $commands = [ - AddUserCommand::class, - Commands\WebSocketServerCommand::class, - Commands\StartServerCommand::class - ]; - - /** - * Define the application's command schedule. - * - * @param \Illuminate\Console\Scheduling\Schedule $schedule - * @return void - */ - protected function schedule(Schedule $schedule) - { - // $schedule->command('inspire') - // ->hourly(); - } -} |