0
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

posted at

firebase functionsの諸々の設定方法

備忘録

リージョンの設定方法

functionsのregionを使用する

functions.region('asia-northeast1')

スペックの指定方法

functionsのrunWithでmemoryを設定する
Cloud Functions の料金にメモリ、CPU、料金の対応表がある

functions.runWith({ memory: '2GB' })

クライアントSDKから直接Cloud Functions for Firebaseを呼び出す場合の指定方法

cloud functions側ではonCallを使う

export const func = functions.https.onCall((data, context) => {
  console.log(data.hoge) // クライアント側が下記の記述の場合にはhoge
})

クライアント側はhttpsCallableを使う

const func = firebase
    .app()
    .functions('asia-northeast1')
    .httpsCallable('func')

await func({ hoge: 'hoge' })
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?