Skip to content

Files

Latest commit

Oct 22, 2024
92ac2de · Oct 22, 2024

History

History
Cannot retrieve ahead/behind information for this branch.

Folders and files

NameName
Last commit message
Last commit date
Jul 16, 2024
Aug 1, 2023
Apr 13, 2024
Aug 11, 2021
Oct 13, 2022
Mar 22, 2023
Sep 5, 2024
Oct 21, 2024
Oct 21, 2024
Apr 4, 2022
Mar 22, 2023
Mar 22, 2023
Oct 13, 2022
May 9, 2022
Oct 13, 2022
Oct 13, 2022
Oct 13, 2022
Oct 22, 2024
Mar 3, 2017
Sep 5, 2024
May 1, 2020
Oct 22, 2024
Oct 22, 2024
Oct 13, 2022
Oct 13, 2022
Jul 3, 2019

README.md

Firebase SDK for Cloud Functions

The firebase-functions package provides an SDK for defining Cloud Functions for Firebase.

Cloud Functions is a hosted, private, and scalable Node.js environment where you can run JavaScript code. The Firebase SDK for Cloud Functions integrates the Firebase platform by letting you write code that responds to events and invokes functionality exposed by other Firebase features.

Learn more

Learn more about the Firebase SDK for Cloud Functions in the Firebase documentation or check out our samples.

Here are some resources to get help:

If the official documentation doesn't help, try asking through our official support channels: https://firebase.google.com/support/

Please avoid double posting across multiple channels!

Usage

// functions/index.js
const { onValueCreated } = require("firebase-functions/database");
const logger = require("firebase-functions/logger");
const notifyUsers = require("./notify-users");

exports.newPost = onValueCreated({ ref: "/posts/{postId}" }, (event) => {
  logger.info("Received new post with ID:", event.params.postId);
  return notifyUsers(event.data.val());
});

Contributing

To contribute a change, check out the contributing guide.

License

© Google, 2017. Licensed under The MIT License.