Skip to content

An example http2 push server written in golang that runs on localhost:8888

Notifications You must be signed in to change notification settings

gaurav-gogia/simple-http2-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

simple-http2-server

simple-http2-server serves the current directory on an HTTP/2.0 capable server. This server is for development purposes only. simple-http2-server serves an index.html file while pushing some css & js assets required by the client.

Installation

Binaries

simple-http2-server is go get-able:

$ go get github.com/DesmondANIMUS/simple-http2-server

Usage

Run the https command from the directory you want to serve and go to https://localhost:8888

That browser warning

When you navigate to the server’s address (most likely https://localhost:8888), you will probably get a warning about the connection being insecure.

This is normal and correct, since the certificate generated by simplehttp2server is self-signed and doesn’t carry the signature of any common certificate authority (CA). All browsers offer a way to temporarily ignore this error and proceed. This is safe to do.

When using Chrome you can enable the allow-insecure-localhost flag on chrome://flags which disableѕ the certificate warning for localhost. This flag is required if you want to use ServiceWorkers on https://localhost with a self-signed certificate you haven't explicitly "trusted".

HTTP/2 PUSH

Any Link headers with rel=preload will be translated to a HTTP/2 PUSH, as is common practice on static hosting platforms and CDNs. See the example above.

About

An example http2 push server written in golang that runs on localhost:8888

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published