Is it possible to deploy t3 app on firebase?
I have specific requirement of running the serverless function for more than 5 minutes. and vercel does not support it. where as firebase provides max timeout of 60 min. which is perfectly suitable for me.
Greatly appreciate any other suggestion?
5 Replies
can i ask what the function does? could there be a better way to process the logic? Does it need to be 5 minutes or is that just an estimate of how long it runs?
I am using open api apis. about 30 calls. each takes avg. 10 sec. 30*10=300 sec. and each next call depends on previous call's response.
Yes, you can, I've done it before with this code under a file in the path
functions/index.ts
And this code in the firebase.json
file
Though I will say that I am a bit skeptical about an endpoint taking 5 minutes for non-dev/testing purposes, can't you break those 30 calls down, say maybe have the client make 30 independent calls? 5 minutes is a lot and, with just slightly unstable internet, the chances of that connection dropping mid-request are VERY high. If you break it into shorter client calls not only you can show the client a better idea of progress in the process but also you don't have to start all over if one of the requests fails@Alejo thanks great suggestion. I will look into it. btw have you notices any problems when working with the firebase deployed next.js?
I am a little skeptical using it in prod, as Firebase site says it's in early public preview.
It hasn't given me any issues I can think of, though it is a very low traffic tool, practically an internal tool for a friend