https://github.com/perimeterx/node-http2-server-push
https://github.com/perimeterx/node-http2-server-push
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/perimeterx/node-http2-server-push
- Owner: PerimeterX
- Created: 2018-08-19T14:24:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-19T22:12:13.000Z (over 7 years ago)
- Last Synced: 2025-04-09T23:10:32.120Z (9 months ago)
- Language: HTML
- Size: 41 KB
- Stars: 8
- Watchers: 13
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-http2-server-push-example
As explained at [this meetup](https://www.meetup.com/NodeJS-Israel/events/250058149). (blogpost link will be linked on near future).
1. remember to create your secure certificate if you don't have one. (if you are testing on localhost, take a look [here](certificate/how-to-create-localhost-certificate.md)).
2. `npm i`
3. start your desired server!
- for native server:
```
node native/index.js
```
- for koa server:
```
node koa/index.js
```
- for hapi server:
```
node hapi/index.js
```
- for express server:
1. run once:
```
node express/fix-spdy.js
```
2. run:
```
node express/spdy.js
```
also, take a look at chrome DevTools to investigate the network traffic, and I also recomment you to look at `chrome://net-internals/#http2` (both on Chrome browser).
For any issues/questions/improvements/enhancements - open an issue/PR :)