-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Unit1.pas
43 lines (34 loc) · 1.22 KB
/
Unit1.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
unit Unit1;
interface
uses
System.SysUtils, System.Classes, Sparkle.HttpServer.Module,
Sparkle.HttpServer.Context, Sparkle.Comp.Server,
Sparkle.Comp.HttpSysDispatcher, Aurelius.Drivers.Interfaces,
Aurelius.Comp.Connection, XData.Comp.ConnectionPool, XData.Server.Module,
XData.Comp.Server, Sparkle.Comp.CorsMiddleware,
Sparkle.Comp.CompressMiddleware, XData.Aurelius.ModelBuilder;
type
TServerContainer = class(TDataModule)
SparkleHttpSysDispatcher: TSparkleHttpSysDispatcher;
XDataServer: TXDataServer;
XDataConnectionPool: TXDataConnectionPool;
AureliusConnection: TAureliusConnection;
XDataServerCompress: TSparkleCompressMiddleware;
XDataServerCORS: TSparkleCorsMiddleware;
procedure DataModuleCreate(Sender: TObject);
end;
var
ServerContainer: TServerContainer;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
procedure TServerContainer.DataModuleCreate(Sender: TObject);
begin
TXDataModelBuilder.LoadXMLDoc(XDataServer.Model);
XDataServer.Model.Title := 'HexaGongs XData Server API';
XDataServer.Model.Version := '1.0';
XDataServer.Model.Description :=
'### Overview'#13#10 +
'This is the REST API for interacting with the HexaGongs XData Server.';
end;
end.