xviz/docs/api-reference/server/xviz-server-middleware-stack.md
Timothy Wojtaszek 6a85f68a72 @xviz/server module (#453)
Proper module to replace our adhoc server script with a structured middleware-based implementation.

Key documents are:
 - RFC ./dev-docs/004-server-module-rfc.md
 - User Docs ./docs/api-reference/server
 - Module Readme ./modules/server/README.md
2019-05-23 16:34:18 -07:00

687 B

XVIZServerMiddlewareStack

XVIZServerMiddlewareStack defines and conforms to the Middleware Interface and routes messages through the middleware stack.

It serves as the entrypoint to the entire middleware dataflow.

Constructor

XVIZServerMiddlewareStack(middlewares)

Parameters:

  • middlewares (Array) - Set of middleware components

Methods

set(middlewares)

Sets the middleware stack.

Useful when you must construct the stack after construction of the XVIZServerMiddlewareStack instance due to it being a dependency of a middleware component.

Parameters:

  • middlewares (Array) - Set of middleware components