diff --git a/functions/helloworld/README.md b/functions/helloworld/README.md index 3264a7a8f4..26aef63c1c 100644 --- a/functions/helloworld/README.md +++ b/functions/helloworld/README.md @@ -18,10 +18,21 @@ See the [Cloud Functions Hello World tutorial][tutorial]. 1. Read and follow the [prerequisites](../../../../#prerequisites). +1. Install and run the [Google Cloud Functions Emulator](https://github.com/GoogleCloudPlatform/cloud-functions-emulator) + + npm install -g @google-cloud/functions-emulator + functions start + 1. Install dependencies: npm install +1. Set the following environment variables: + + export GCF_REGION=us-central1 + export FUNCTIONS_TOPIC=[YOUR_PUBSUB_TOPIC] + export FUNCTIONS_BUCKET=[YOUR_CLOUD_STORAGE_BUCKET] + 1. Run the tests: npm test diff --git a/functions/helloworld/package.json b/functions/helloworld/package.json index b932337a33..6e62261159 100644 --- a/functions/helloworld/package.json +++ b/functions/helloworld/package.json @@ -25,7 +25,6 @@ "safe-buffer": "5.1.1" }, "devDependencies": { - "@google-cloud/functions-emulator": "^1.0.0-beta.5", "@google-cloud/nodejs-repo-tools": "^2.2.5", "@google-cloud/pubsub": "^0.17.0", "@google-cloud/storage": "^1.5.0", @@ -43,9 +42,10 @@ "requiresProjectId": true, "requiredEnvVars": [ "BASE_URL", + "GCLOUD_PROJECT", "GCF_REGION", - "TOPIC", - "BUCKET", + "FUNCTIONS_TOPIC", + "FUNCTIONS_BUCKET", "FUNCTIONS_CMD" ] }