24 lines
452 B
PHP
24 lines
452 B
PHP
<?php
|
|
|
|
namespace acs;
|
|
|
|
use Acast\Http\Server;
|
|
use Workerman\Worker;
|
|
|
|
foreach (glob(__DIR__.'/Init/*.php') as $init_file)
|
|
require_once $init_file;
|
|
|
|
Server::create('acs', '[::]:7722');
|
|
Worker::$pidFile = __DIR__ . '/workerman.pid';
|
|
|
|
Server::app('acs')->workerConfig([
|
|
'name' => 'acs',
|
|
'count' => 1
|
|
]);
|
|
|
|
Server::app('acs')->event('WorkerStart', function () {
|
|
init_config();
|
|
init_structure();
|
|
init_routes();
|
|
init_database();
|
|
}); |