Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is Firebase cloud functions, do the terminologies 2gen and v2 refer to the same thing?

I’m checking out the Quotas and Limits for Firebase Functions on https://firebase.google.com/docs/functions/quotas
I see that the timeout for 2gen functions is up to 60min.

enter image description here

And I was wondering how can I convert my functions to 2gen.
Is this what the "Cloud Functions v2 public preview" is about?
https://firebase.google.com/docs/functions/beta

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

Do the terminologies "2gen" and "v2" refer to the same thing?

Sadly, in the docs they never use both terminlogies in the same page, so even though it looks like it’s the same thing, it’s still not clear to me.

>Solution :

Yes, they refer to the same thing. To convert your existing functions to gen 2, you just need to use the top level functions from the new SDK. For example:

const {onRequest} = require('firebase-functions/v2/https')

exports.myfunction = onRequest((req, res) => {})
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading