Skip to content

How to launch a HTTP2 development web server

Lloyd Brookes edited this page Mar 6, 2018 · 8 revisions

This feature requires node version 8.4.0 or above

As an HTTP2 server must always be secure (else modern browsers will ignore it), launching an HTTP2 server is identical to launching an HTTPS server with the one exception, you additionally set the --http2 flag.

So, typical usage looks the same. Launch HTTP2 using the built-in SSL certificate:

$ ws --http2

Launch using your own private key and certificate:

$ ws --http2 --key my-key.pem --cert my-cert.pem
Clone this wiki locally