This repository has been archived on 2018-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
BBB-Simple-ACS/server/src/main.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();
});