Skip to content

Commit

Permalink
Tips: add region tags (#696)
Browse files Browse the repository at this point in the history
* Add terminate region tag

* Massage terminate region tag
  • Loading branch information
Ace Nassri authored Jul 23, 2018
1 parent 349b4b7 commit 1b5e746
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 1b5e746

Please sign in to comment.