File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,21 @@ See the [Cloud Functions Hello World tutorial][tutorial].
1818
19191 . Read and follow the [ prerequisites] ( ../../../../#prerequisites ) .
2020
21+ 1 . Install and run the [ Google Cloud Functions Emulator] ( https://github.com/GoogleCloudPlatform/cloud-functions-emulator )
22+
23+ npm install -g @google-cloud/functions-emulator
24+ functions start
25+
21261 . Install dependencies:
2227
2328 npm install
2429
30+ 1 . Set the following environment variables:
31+
32+ export GCF_REGION=us-central1
33+ export FUNCTIONS_TOPIC=[YOUR_PUBSUB_TOPIC]
34+ export FUNCTIONS_BUCKET=[YOUR_CLOUD_STORAGE_BUCKET]
35+
25361 . Run the tests:
2637
2738 npm test
Original file line number Diff line number Diff line change 2525 "safe-buffer" : " 5.1.1"
2626 },
2727 "devDependencies" : {
28- "@google-cloud/functions-emulator" : " ^1.0.0-beta.5" ,
2928 "@google-cloud/nodejs-repo-tools" : " ^2.2.5" ,
3029 "@google-cloud/pubsub" : " ^0.17.0" ,
3130 "@google-cloud/storage" : " ^1.5.0" ,
4342 "requiresProjectId" : true ,
4443 "requiredEnvVars" : [
4544 " BASE_URL" ,
45+ " GCLOUD_PROJECT" ,
4646 " GCF_REGION" ,
47- " TOPIC " ,
48- " BUCKET " ,
47+ " FUNCTIONS_TOPIC " ,
48+ " FUNCTIONS_BUCKET " ,
4949 " FUNCTIONS_CMD"
5050 ]
5151 }
You can’t perform that action at this time.
0 commit comments