Skip to content

Teal/H2Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

H2Server

An out-of-the-box web server for serving up local files, support https & http2.

overview

Installation

First, install Node.js. Then:

npm install h2server -g

Usage

Run h2server on the command line to fire up an HTTP/1.1 server on 0.0.0.0:

h2server

H2Server will serve out of your current working directory.

You can pass in arguments to change the port and host:

h2server 8080

In order to support HTTP/2, you should specify an https url:

h2server https://0.0.0.0:8080

By default, H2server will use an untrusted self-signed certificate. You should skip the certificate warning in browser. Pass --cert and --key to specify your certificate.

In additional, you can pass -o/--open to open homepage in browser when started:

h2server -o

Options

  • --open, -o: Open browser after starting the server
  • --help, -h, -?: Print helps
  • --cors: Enable CORS via the Access-Control-Allow-Origin header
  • --proxy, -p: Proxies all requests which can't be resolved locally to the given url. e.g.: -p http://someurl.com
  • --cert: Path to ssl cert file
  • --key : Path to ssl key file
  • --version, -v: Print version

About

An out-of-the-box web server for serving up local files, support https & http2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published