PHP code example of flightphp / apm

1. Go to this page and download the library: Download flightphp/apm library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flightphp / apm example snippets


   use flight\apm\logger\LoggerFactory;
   use flight\Apm;

   $ApmLogger = LoggerFactory::create(__DIR__ . '/../../.runway-config.json');
   $Apm = new Apm($ApmLogger);
   $Apm->bindEventsToFlightInstance($app);
   
bash
   php vendor/bin/runway apm:init
   
bash
   php vendor/bin/runway apm:worker
   
bash
   php vendor/bin/runway apm:worker --daemon
   
bash
   php vendor/bin/runway apm:dashboard --host localhost --port 8001