I try to write and XData server as a windows service, but after installing it, the service runs and stops immediately.
I found some info on the web, but I'm stuck on how to properly start the service I have written this
procedure TTitaniaAdminServer.ServiceStart(Sender: TService; var Started: Boolean); begin ServerContainer := TServerContainer.Create(nil); ServerContainer.SparkleHttpSysDispatcher.Start; Started := true; end;
On the documentation is written to start a new thread, but I don't know how to do it with XData with a datamodule: http://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.SvcMgr.TService.OnExecute
Is there any extra examples about this topic? If not, could you provide me a basic code to understand the problem?