Skip to content

A simple, zero dependency, NodeJS HTTP2 server suitable for development projects.

License

Notifications You must be signed in to change notification settings

tforster/http2-server

Repository files navigation

HTTP2 Server

A simple, zero dependency, Node.js HTTP2 server for development projects.

HTTP2 Server uses Node's HTTP2 module to securely serve local files.
Requests with no extension are optionally checked for with a .html extension.

Prerequisites

The versions listed for these prerequisites are current at the time of writing.
While more recent versions are likely to work, your mileage may vary...

Installation

  1. Add HTTP2 Server as a developer dependency in your current web project:

    npm install tforster/http2-server --save-dev
  2. Create a self-signed certificate in the project root:

    sh node_modules/http2-server/scripts/create-certs.sh

Usage

  1. Start the local development server:

    node node_modules/http2-server \
      --root $DIRECTORY_ROOT \
      --cert $DIRECTORY_CERT \
      --port $PORT \
      --extensions true # set to true to look for files with .html

Contributing

To contribute to this project, please see CONTRIBUTING.md.

Change Log

All released versions are available as tags on this repository.
To view the release notes for all available versions, please see CHANGELOG.md.

License

This project is licensed under the MIT License, please see LICENSE.txt.

Attribution

Created by tforster.
Based on code by webdivelement.
Maintained by tforster and webdivelement.

View the GitHub repository or the list of contributors for this project.

About

A simple, zero dependency, NodeJS HTTP2 server suitable for development projects.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published