Next.js Discord

Discord Forum

Using firebase with Server components

Unanswered
rex1410 posted this in #help-forum
Open in Discord
Hello all.

I want to use Firebase with app directory. I need to use Firestore, cloud storage and firebase app. I have the following doubts:

Can I create a single instance of the firebase app, firestore db and cloud storage on server side? How can I do this so all my route handlers can access that? Or will each route handler need its own instance of the above 3?

2 Replies