Gitlab NPM Twitter
Kado
High Quality JavaScript Libraries

HyperText

Introduced in 4.0.0

Stability: 1 - Experimental

const HyperText = require('kado/lib/HyperText')

This library provides an abstraction layer for use with Kado system that provides the framework for multiple web servers to register for live I/O use within the system.

There is a HyperTextEngine library that provides the needed implementation to setup traditional web servers into this abstraction layer.

Class: HyperText

HyperText extends Connect see Connect for more engine management and more.

static HyperText.getInstance()

HyperText.start(port, host)

HyperText.stop()

Class: HyperTextEngine

HyperTextEngine extends ConnectEngine see ConnectEngine for more engine management and more.

HyperTextEngine.start()

Must be extended and used to start the underlying server.

HyperTextEngine.stop()

Must be extended and used to stop the underlying server.

Class: HyperTextServer

HyperTextServer extends HyperTextEngine and provides a complete HTTP web server for use with Application

static HyperTextServer.finalHandler(req, res)

Default finalHandler route.

Internal Use

HyperTextServer.constructor()

HyperTextServer.setHost(host)

HyperTextServer.setPort(port)

HyperTextServer.setSSL(ssl)

HyperTextServer.createServer(router)

Use to create the actual underlying HTTP server after all settings have been applied.

Will then set the provided router using the setRouter(router) method below.

HyperTextServer.setRouter(router)

This is typically called by Application during setupHyperText()

Internal Use

HyperTextServer.getRouter()

HyperTextServer.onRequest(req, res)

This method is set to the request event the server generates.

Internal Use

Class: StaticServer

Provides a basic static file server to be used as middleware.

static StaticServer.getMiddleware (root, options)

StaticServer.constructor(root, options)

StaticServer.resolve(url)

StaticServer.request(req, res)

Class: Proxy

static Proxy.pass(req, res, options)

Available options: