This app demonstrates how to run gRPC client libraries on App Engine Standard.
-
Install
composer -
Install dependencies by running:
composer install
-
Install the Google Cloud SDK.
These samples cannot be run locally with the Dev AppServer because gRPC has not been packaged with the Dev AppServer for PHP at this time.
The Cloud Monitoring sample
The monitoring sample will work out of the box by doing the following:
gcloud config set project YOUR_PROJECT_ID
gcloud app deploy
gcloud app browse
The last command will open https://{YOUR_PROJECT_ID}.appspot.com/
in your browser. Browse to /monitoring to see the sample.
The Cloud Spanner sample
You will need to create a Spanner Instance and a Spanner Database.
Next, open up spanner.php in a text editor and change the values of
your-instance-id and your-database-id to the Instance ID and Database ID you
created.
Now you can deploy your application and it will work as expected:
gcloud config set project YOUR_PROJECT_ID
gcloud app deploy
gcloud app browse
The last command will open https://{YOUR_PROJECT_ID}.appspot.com/
in your browser. Browse to /spanner to see the sample.
