Skip to content

Instantly share code, notes, and snippets.

@grant
Last active December 8, 2022 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grant/310e05ddbc20080d97bca329bfaa84a6 to your computer and use it in GitHub Desktop.
Save grant/310e05ddbc20080d97bca329bfaa84a6 to your computer and use it in GitHub Desktop.
Hello Cloud Pub/Sub
/**
* Background Cloud Function to be triggered by Pub/Sub.
* This function is exported by index.js, and executed when
* the trigger topic receives a message.
*
* @param {object} data The event payload.
* @param {object} context The event metadata.
*/
exports.helloPubSub = (data, context) => {
const pubSubMessage = context;
const name = pubSubMessage.data
? Buffer.from(pubSubMessage.data, 'base64').toString()
: 'Cloud Pub/Sub';
console.log(`Hello, ${name}!`);
};
@mdgwp
Copy link

mdgwp commented Dec 8, 2022

Hello,pubsub! The last hierographical error message, note on account, last page.

@mdgwp
Copy link

mdgwp commented Dec 8, 2022

@mdgwp
Copy link

mdgwp commented Dec 8, 2022

Github.aristocracy.exec.401(k)Index.js #mdg_wp.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment