Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
composer.json | 22-Oct-2020 | 220 | |
greeter_client.php | 22-Oct-2020 | 1.5K | |
greeter_proto_gen.sh | 22-Oct-2020 | 745 | |
README.md | 22-Oct-2020 | 1.2K | |
route_guide/ | 22-Oct-2020 | ||
run_greeter_client.sh | 22-Oct-2020 | 691 |
1 gRPC in 3 minutes (PHP) 2 =========================== 3 4 PREREQUISITES 5 ------------- 6 7 This requires `php` >=5.5, `phpize`, `pecl`, `phpunit` 8 9 INSTALL 10 ------- 11 - Install the gRPC PHP extension 12 13 ```sh 14 $ [sudo] pecl install grpc 15 ``` 16 17 - Clone this repository 18 19 ```sh 20 $ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc 21 ``` 22 23 - Install composer 24 25 ``` 26 $ cd examples/php 27 $ curl -sS https://getcomposer.org/installer | php 28 $ php composer.phar install 29 ``` 30 31 TRY IT! 32 ------- 33 34 - Run the server 35 36 Please follow the instruction in [Node][] to run the server 37 ``` 38 $ cd examples/node 39 $ npm install 40 $ cd dynamic_codegen or cd static_codegen 41 $ node greeter_server.js 42 ``` 43 44 - Generate proto files and run the client 45 46 ``` 47 $ cd examples/php 48 $ ./greeter_proto_gen.sh 49 $ ./run_greeter_client.sh 50 ``` 51 52 NOTE 53 ---- 54 55 This directory has a copy of `helloworld.proto` because it currently depends on 56 some Protocol Buffer 2.0 syntax. There is no proto3 support for PHP yet. 57 58 TUTORIAL 59 -------- 60 61 You can find a more detailed tutorial in [gRPC Basics: PHP][] 62 63 [Node]:https://github.com/grpc/grpc/tree/master/examples/node 64 [gRPC Basics: PHP]:https://grpc.io/docs/tutorials/basic/php.html 65