mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2025-07-27 05:08:51 +00:00
.github
apps
data analysis
website
functions
node_modules
.bin
@types
accepts
array-flatten
body-parser
buffer-equal-constant-time
bytes
content-disposition
content-type
cookie
cookie-signature
cors
debug
depd
destroy
ecdsa-sig-formatter
ee-first
encodeurl
escape-html
etag
express
finalhandler
firebase-functions
lib
.npmignore
.prettierrc
LICENSE
README.md
changelog.txt
package.json
upgrade-warning
forwarded
fresh
http-errors
iconv-lite
inherits
ipaddr.js
jsonwebtoken
jwa
jws
lodash
lodash.includes
lodash.isboolean
lodash.isinteger
lodash.isnumber
lodash.isplainobject
lodash.isstring
lodash.once
media-typer
merge-descriptors
methods
mime
mime-db
mime-types
ms
negotiator
npm
object-assign
on-finished
parseurl
path-to-regexp
proxy-addr
qs
range-parser
raw-body
safe-buffer
safer-buffer
send
serve-static
setprototypeof
statuses
type-is
unpipe
utils-merge
vary
public
.firebaserc
.gitignore
.runtimeconfig.json
firebase.json
firestore.indexes.json
firestore.rules
package-lock.json
.gitattributes
.gitignore
CONTRIBUTING.md
LICENSE
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.
Migrating to v1
To migrate from a beta version of firebase-functions to v1, please refer to the migration guide.
Usage
// functions/index.js
const functions = require('firebase-functions');
const notifyUsers = require('./notify-users');
exports.newPost = functions.database
.ref('/posts/{postId}')
.onCreate((snapshot, context) => {
console.log('Received new post with ID:', context.params.postId);
return notifyUsers(snapshot.val());
});
Contributing
To contribute a change, check out the contributing guide.
License
© Google, 2017. Licensed under The MIT License.