I'd obviously closed the last post a bit early.
I'm trying to do this all in code and am obviously missing something. My StartServer procedure is something like
procedure StartServer;
var
Module : TXDataServer;
begin
if Assigned(SparkleServer) then
Exit;
SparkleServer := THttpSysServer.Create;
Module := TXDataServer.Create(Nil);
Module.BaseUrl := SystemSettings.ListenBaseURI + '/auth';
Module.ModelName := AUTH_MODEL;
Module.SwaggerOptions.Enabled := True;
Module.MiddlewareList.Add(TSparkleCorsMiddleware.Create(Nil));
SparkleServer.AddModule(Module);
SparkleServer.Start;
end;
This fails on SparkleServer.AddModule(Module); Obviously I ned the TXDataServerModule which is created, but can't quite work out how to fit it all together.
Any pointers, thanks