lite-server icon indicating copy to clipboard operation
lite-server copied to clipboard

Use HTTP/2 and SPDY

Open goldibex opened this issue 8 years ago • 6 comments

Thanks so much for building this tool, it's really outstandingly useful.

In keeping with the "the future is today" mentality of most of the newer JS frameworks, would you be willing to entertain a PR that introduced support for HTTP/2 and SPDY via node-spdy?

goldibex avatar Jan 20 '16 16:01 goldibex

As a simple development server I don't feel like this has much value. Is there a particular use-case for development that you have that requires HTTP/2?

Running lite-server in production is absolutely not recommended. :)

Another quirk is that this project is a simple wrapper around BrowserSync's server feature. If it can't do HTTP/2, then I assume we'd have large difficulty trying to work that in via lite-server. But if Browsersync ever does include that feature, it could be easily enabled through lite-server's overrides.

cgmartin avatar Jan 31 '16 14:01 cgmartin

I agree with Chris, but curiosity has got me ... I'd like to see what you have in mind just to satisfy that :)

johnpapa avatar Feb 03 '16 13:02 johnpapa

Thanks all. Well, let me lay out my arguments for you here first -- if they're totally unconvincing it may not be worth the effort.

  1. lite-server is part of the "future, now" Javascript ecosystem. It's advertised for use developing with JSPM and Angular 2, for instance. HTTP/2 is the future of communication on the Web, so it makes sense to get people developing on that now.
  2. I have some very, very preliminary data showing that in development cases where hundreds of objects need to be loaded from the server (common enough with JSPM and even modestly sized projects these days), HTTP/2 can cut down time to first load for developers considerably.
  3. It's a little-ish issue, but I think it's also important to get developers saying the mantra "SSL only," starting from their development instances. I've already developed a tool that de-complicates the process so you don't have to worry about bright red SSL warnings more than, say, once a month. It's true that you could do the same thing against HTTP/1.1 also, but packaging it with a move to HTTP/2 makes it easier for developers to swallow -- honey on the rim of the medicine cup, as it were.

If this is at least a colorable argument to you, let me know and I'll take a pass at it.

All best Harry

On Wed, Feb 3, 2016 at 5:53 AM John Papa [email protected] wrote:

I agree with Chris, but curiosity has got me ... I'd like to see what you have in mind just to satisfy that :)

— Reply to this email directly or view it on GitHub https://github.com/johnpapa/lite-server/issues/15#issuecomment-179246414 .

goldibex avatar Feb 03 '16 17:02 goldibex

+1

jakeNiemiec avatar May 24 '16 16:05 jakeNiemiec

Another +1 for this, especially as a development server.

When you load Angular2 via SystemJS, you have quite a large number of requests depending on your import tree.

This is not the production experience, but it kinda slows down the development experience (sample).

HTTP/2 might be a good solution for this development-only problem.

Meligy avatar May 27 '16 14:05 Meligy

+1

j-perezr avatar Apr 07 '17 08:04 j-perezr