This commit is contained in:
parent
1a1a642ee9
commit
8488186496
23
.watcher.php
Normal file
23
.watcher.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
/**
|
||||||
|
* This file is part of Hyperf.
|
||||||
|
*
|
||||||
|
* @link https://www.hyperf.io
|
||||||
|
* @document https://hyperf.wiki
|
||||||
|
* @contact group@hyperf.io
|
||||||
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
||||||
|
*/
|
||||||
|
use Hyperf\Watcher\Driver\ScanFileDriver;
|
||||||
|
|
||||||
|
return [
|
||||||
|
'driver' => ScanFileDriver::class,
|
||||||
|
'bin' => PHP_BINARY,
|
||||||
|
'watch' => [
|
||||||
|
'dir' => ['app', 'config'],
|
||||||
|
'file' => ['.env'],
|
||||||
|
'scan_interval' => 2000,
|
||||||
|
],
|
||||||
|
'ext' => ['.php', '.env'],
|
||||||
|
];
|
@ -12,6 +12,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use Hyperf\HttpServer\Annotation\AutoController;
|
||||||
|
|
||||||
class IndexController extends AbstractController
|
class IndexController extends AbstractController
|
||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check if vendor directory exists
|
|
||||||
if [ ! -d "/opt/www/vendor" ]; then
|
|
||||||
# Run composer install if vendor directory does not exist
|
|
||||||
composer install
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run Hyperf application
|
|
||||||
php bin/hyperf.php "$@"
|
|
Loading…
Reference in New Issue
Block a user