Configuration file utilities for @http2 projects


5.5.14 years ago4 years agoMinified + gzip package size for @http2/configuration in KB


@http2/configuration ⚙️

These are the schemas for @http2/server configuration files. They are shared between various related projects. This package acts as the versioned reference.

ConfigurationValidator Class

Instance of the Validator class from jsonschema. Restricted to custom schemas and formats.

const {ConfigurationValidator} = require('@http2/configuration')

const validator = new ConfigurationValidator()

const configuration = {
  hosts: [
      domain: 'http2.live',
      root: 'public'

// Throws the first encountered error if the configuration syntax is invalid,
// otherwise returns `true`.

JSON Schemas


The overall options schema defines the main structure of a configuration file.

const optionsSchema = require('@http2/configuration/schema/options')


The schema specifically for validating a host section of the configuration.

const hostSchema = require('@http2/configuration/schema/host')


The HTTP/2 Server Push Manifest schema is available in @http2/manifest and used to validate the manifest property of a host.

const {schema: manifestSchema} = require('@http2/manifest')

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.