firebase-functions icon indicating copy to clipboard operation
firebase-functions copied to clipboard

fastify support

Open achmadk opened this issue 5 years ago • 4 comments

In this video, firebase functions can successfully integrate with node.js application, specifically express framework. I want to use fastify framework because it has better performance than express.

Unfortunately, when I am using fastify, I got error like this:

TypeError: handler is not a function
    at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:49:9)
    at /worker/worker.js:783:7
    at /worker/worker.js:766:11
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickDomainCallback (internal/process/next_tick.js:219:9)

achmadk avatar Jan 17 '20 20:01 achmadk

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Jan 17 '20 20:01 google-oss-bot

@achmadk If Fastify doesn't work for you there are other (an maybe better) options than Fastify to replace express: https://github.com/fastify/benchmarks#benchmarks

laurentpayot avatar Mar 08 '20 11:03 laurentpayot

Check out fastify/fastify#946 for instructions on how to get fastify working for Firebase Functions.

It's a bit unfortunate that you have to jump through hoops to get things working. I'll see if there are ways to improve fastify integration w/ Firebase functions...

taeold avatar Jun 26 '21 09:06 taeold