Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions functions/helloworld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions functions/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -43,9 +42,10 @@
"requiresProjectId": true,
"requiredEnvVars": [
"BASE_URL",
"GCLOUD_PROJECT",
"GCF_REGION",
"TOPIC",
"BUCKET",
"FUNCTIONS_TOPIC",
"FUNCTIONS_BUCKET",
"FUNCTIONS_CMD"
]
}
Expand Down