These are chat archives for 75lb/local-web-server

9th
Apr 2018
Benny Powers
@bennypowers
Apr 09 2018 05:11

Hi There! I'm working on an h2 push middleware, based on https://github.com/silenceisgolden/koa-server-push/blob/master/lib/serverpush.js

Here's my work so far, although it doesn't get as far as resolving the manifest yet. I'm a koa beginner, so any tips you can provide are appreciated.

https://pastebin.com/i4PwJ8tG

Lloyd Brookes
@75lb
Apr 09 2018 14:57
koa-server-push: this library has not been touched since Dec 2015, a lot has changed in Koa and node since then.. i wouldn't touch this library..
regarding the best way to implement H2 in local-web-server, i'm not sure what to suggest as i've not looked into it myself yet..
Lloyd Brookes
@75lb
Apr 09 2018 15:04
Koa itself is dependent on the traditional node HTTP interface (documented on the node website). Currently, HTTP2 in local-web-server only works thanks to node's compatibility API.
the http2stream.pushStreammethod is part of the new "core API", it's not available on the compatibility API meaning Koa (and therefore local-web-server) does not yet support it.. needs proper investigation... the solution might be something brand new and bespoke, not based on Koa.
it's not a quick fix
Benny Powers
@bennypowers
Apr 09 2018 16:00
👌 I'll use preload links, maybe headers too