1. Go to this page and download the library: Download mix/micro 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/ */
mix / micro example snippets
$server = new \Mix\Grpc\Server('0.0.0.0'); // 默认会随机分配端口,也可以指定
$server->register(SayService::class);
$registry = new \Mix\Micro\Etcd\Registry('http://127.0.0.1:2379/v3');
$config = new \Mix\Micro\Etcd\Config('http://127.0.0.1:2379/v3');
$config->listen($eventDispatcher); // PSR-14 Event Dispatcher
[2020-05-21 21:01:18] API.INFO: Server started [0.0.0.0:51438]
[2020-05-21 21:01:18] API.INFO: Register service [php.micro.grpc.greeter-2938109e-9b63-11ea-80bd-000057bdb82e]
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.