Skip to content

Tips: add region tags #696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 23, 2018
Merged
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
5 changes: 5 additions & 0 deletions functions/helloworld/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,26 @@ exports.helloGET = (req, res) => {
* @param {Object} req Cloud Function request context.
* @param {Object} res Cloud Function response context.
*/
// [START functions_tips_terminate]
exports.helloHttp = (req, res) => {
res.send(`Hello ${req.body.name || 'World'}!`);
};
// [END functions_helloworld_http]

// [END functions_tips_terminate]

// [START functions_helloworld_background]
/**
* Background Cloud Function.
*
* @param {object} event The Cloud Functions event.
* @param {function} callback The callback function.
*/
// [START functions_tips_terminate]
exports.helloBackground = (event, callback) => {
callback(null, `Hello ${event.data.name || 'World'}!`);
};
// [END functions_tips_terminate]
// [END functions_helloworld_background]

// [START functions_helloworld_pubsub]
Expand Down