macchiato-framework / macchiato-core

Ring style HTTP server abstraction for Node.js
MIT License
377 stars 35 forks source link

Add support for HTTP2 #48

Open lyderichti59 opened 3 years ago

lyderichti59 commented 3 years ago

Hi,

I'm about to switch my Reagent webapp's frontend server from the JVM to Node.js to take profit from React Server Side Rendering. I'm sincerely considering to use Macchiato as a Clojurish backend server on Nodejs.

I would like to implement some HTTP2 functionalities to push critical assets. Is there a way I can achieve this with Macchiato ? I couldn't find any resources about HTTP2 support.

Thanks for your work and ideas !

yogthos commented 3 years ago

It looks like it's just a matter of creating an HTTP2 server. The server namespace would need to be updated to provide support for instantiating an HTTP2 server. Would make sense to extend the start function to take :http2? as a flag to do that. I won't have time to look at this in the near future, but if you'd be open to do a PR I can help merge that in and do a release.