workerman.php 403 B

123456789101112131415
  1. <?php
  2. use Benchmark\Application;
  3. use Hamlet\Database\PDO\PDODatabase;
  4. use Hamlet\Http\Workerman\Bootstraps\WorkermanBootstrap;
  5. require_once __DIR__ . '/vendor/autoload.php';
  6. $database = new PDODatabase(
  7. 'mysql:host=tfb-database;dbname=hello_world',
  8. 'benchmarkdbuser',
  9. 'benchmarkdbpass'
  10. );
  11. $application = new Application($database);
  12. WorkermanBootstrap::run('0.0.0.0', 8080, $application);