Giter Site home page Giter Site logo

gaurav-gogia / simple-http2-server Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 5.7 MB

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

CSS 35.39% JavaScript 11.72% HTML 35.91% Go 16.99%
golang http2 http2-push http2-server https secure-by-default website

simple-http2-server's Introduction

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.

simple-http2-server's People

Contributors

0xb000 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

vahidmohsseni

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.