json-api icon indicating copy to clipboard operation
json-api copied to clipboard

Fastify integration

Open StaringSkyward opened this issue 5 years ago • 3 comments

I like the look of https://www.fastify.io/ and would like to create an integration for it. It uses a plugin design which seems pretty different to Express and other examples here, so I'm not sure what form that integration would take... Is this something that would be of any value before I take it on?

StaringSkyward avatar Mar 05 '19 14:03 StaringSkyward

Take a look at the ExpressStrategy if you haven't already. Honestly, I think it should be pretty similar. The API for fastify's reply object looks about the same. The biggest difference appears to be that fastify request handlers don't take a next argument, so the functions returned from the methods on your new adapter (ie., from apiRequest and all the methods from here downward) won't either.

ethanresnick avatar Mar 05 '19 21:03 ethanresnick

Thanks @ethanresnick, I'll give it a try. I'm coming from Ruby and pretty new to Node so this will be a challenge but really useful to me and others I hope.

StaringSkyward avatar Mar 08 '19 16:03 StaringSkyward

I'm on it!

twss avatar Apr 11 '19 17:04 twss