Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 684 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 684 Bytes

node-http2-server-push-example

Send/receive HTTP/2 server push with Node.js

This repo includes three examples:

  • server.js uses "stream" event
  • server-handler.js uses compaticility API (i.e. (req, res) => void)
  • server-hapi.js uses hapi.js

Once you start a server, run client.js to access. You can also use other http clients that support http2 server push, such as nghttp2.

Usage

git clone https://github.com/shumbo/node-http2-server-push-example.git
yarn
node server.js # to start server
node client.js # to start client