This package has been deprecated

Author message:

moved to @http2/configuration

http2configuration

4.0.0 • Public • Published

http2configuration 🕵️‍

These are the schemas for http2server configuration files. They are shared between various related projects. This package acts as versioned truth, i.e. common ground.

ConfigurationValidator Class

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

import {ConfigurationValidator} from 'http2configuration'

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`.
validator.validate(configuration)

JSON Schemas

options

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

import optionsSchema from 'http2configuration/schema/options'

host

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

import hostSchema from 'http2configuration/schema/host'

manifest

Schema to validate the server push manifest configuration.

import hostSchema from 'http2configuration/schema/manifest'

See Also

Package Sidebar

Install

npm i http2configuration

Weekly Downloads

3

Version

4.0.0

License

ISC

Last publish

Collaborators

  • seb