Table of Contents

TSparkleServer Class

Abstract ancestor for Sparkle server components, which define a server module listening at a base URL and connect to a dispatcher component that owns the actual HTTP server.

Syntax

Unit: Sparkle.Comp.Server

TSparkleServer = class(TComponent);

Constructors

Name Description
Create Creates a new server component.

Methods

Name Description
CreateModule Creates the server module defined by this component, with the attached middlewares applied to it.

Properties

Name Description
BaseUrl Gets or sets the base URL the server module listens at.
Dispatcher Gets or sets the dispatcher component that serves this server component.
MiddlewareList The middleware components attached to this server, applied to the created server modules in list order.

Events

Name Description
OnModuleCreate Event fired after the server module is created, allowing further customization of the module.