As I delve into using Firebase functions with Express, following the Firebase documentation, I find myself passing my Express app as an argument for onRequest:
exports.myFunction = functions.https.onRequest(app);
This approach works seamlessly.
In an effort to optimize performance and minimize cold starts, I aim to prevent my app from scaling down to 0 instances. However, I encounter a roadblock when trying to pass options along with my app:
exports.myFunction = functions.https.onRequest({
minInstances: 2,
}, app);
An error stating "TypeError: handler is not a function" crops up in my functions logs...