how to test Cloud Functions for Firebase locally on pc

前端 未结 9 1488
耶瑟儿~
耶瑟儿~ 2020-11-27 16:39

Today Firebase released its brand new product Cloud Functions for Firebase and I just created a hello world function and deploy it on my existing firebase project.

I

9条回答
  •  南方客
    南方客 (楼主)
    2020-11-27 16:57

    >> Is there any way to test Cloud Functions for Firebase locally?

    You can use the following command to start a firebase shell (execute in your functions directory):

    npm run build && firebase functions:shell
    

    You can invoke your functions in the shell like so:

    helloWorld()
    

    Refer this link for more information.

提交回复
热议问题