Does Remix proprietary express serve serve using HTTP/1 by default? #9130
-
We are seeing our JS bundles being served using HTTP/1, so just wanted to check if Remix express server is doing this by default and, is so, why not HTTP/2? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Remix isn't an HTTP server, it's just a request handler. So whether the request is served from an HTTP/1 or HTTP/2 server is up to Express, or whatever other HTTP server you're using. I can only hazard a guess as to why - HTTP/1 is more broadly supported and is easier to set up overall. For example, HTTP/2 requires TLS certificates, which can make local dev annoying. To make onboarding easier, Remix defaults to HTTP/1, which works for most use-cases. |
Beta Was this translation helpful? Give feedback.
Yes, the built-in server that Remix's CLI provides for convenience is using express. But, they specifically say that it's basic and you should use their Express adapter (or another adapter) if you want to do anything more sophisticated. I would say HTTP/2 falls into that category.