PHP code example of meandor / stirling-microservice
1. Go to this page and download the library: Download meandor/stirling-microservice 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/ */
meandor / stirling-microservice example snippets
Router::init();
Router::run();
Router::add('info', function () {
phpinfo();
});
use Stirling\Core\Config;
$config = Config::instance();
echo $config->foo
$status = AppStatus::instance();
$status->registerStatus("status 1", "Descriptive message for this status", function () {
return true;
});