Skip to content
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
16 changes: 0 additions & 16 deletions functions/node8/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,6 @@ const fetch = require('node-fetch');
// [END functions_background_promise_node8]
// [END functions_background_async]

/**
* HTTP Cloud Function (same signature as other Node runtimes)
*
* @param {Object} req Cloud Function request context.
* More info: https://expressjs.com/en/api.html#req
* @param {Object} res Cloud Function response context.
* More info: https://expressjs.com/en/api.html#res
*/
// [START functions_tips_terminate_node8]
const escapeHtml = require('escape-html');

exports.helloHttp = (req, res) => {
res.send(`Hello ${escapeHtml(req.query.name || req.body.name || 'World')}!`);
};
// [END functions_tips_terminate_node8]

// [START functions_tips_infinite_retries_node8]
/**
* Background Cloud Function that only executes within a certain time
Expand Down