Skip to content

bakins/grpc-fastcgi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grpc-fastcgi-example

Example usage of grpc-fastcgi-proxy

This is a simple PHP application copied from the gRPC examples and a client of that example.

Bootstrap

This has been tested with PHP7 on OS X. To install the prerequisites using homebrew:

brew tap homebrew/php
brew install php71 --without-apache --with-fpm
brew install homebrew/php/php71-grpc
brew install homebrew/php/php71-protobuf

The gRPC quickstart guide has instructions for Linux.

Testing

Clone, build, and run grpc-fastcgi-proxy.

It should use index.php in the repository for it's script file. So run something like:

grpc-fastcgi-proxy $HOME/git/grpc-fastcgi-example/index.php

Start php-fpm. On OS X, /usr/local/sbin/php71-fpm start

Now run php ./greeter_client.php (make sure you are using PHP 71).

$ php greeter_client.php
Hello world

That's it. It doesn't look like much, but this sent a gRPC request to grpc-fastcgi-proxy which proxied it to php-fpm and handled all the transcoding.

LICENSE

See LICENSE.

Acknowledgements

About

Example application for use with grpc-fastcgi-proxy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages