Firebase Admin SDK reinitializes on every request in Next.js API routes
I’m working on a Next.js app, and I’ve noticed that my Firebase Admin SDK initializes every time I make a request to my app via a Next.js API route. This seems inefficient, and I’m not sure how to fix this issue. Below is the code I’m using: