Sphinx has no built-in service support and the doco refers to Sparkle, but then Sparkle requires a "module" and that's where I lost the plot.
So, how do I convert an interactive project to a Windows Service?
I can create a new Sparkle project and choose Service, it creates a service framework, but then where would I define/create/plug-in and what exactly, to pass it in to Sparkle as a module?
I'd be especially interested to have both projects share sources, so I can debug it here and run there, without copying pages of code across. But it seems that the paradigms are opposite: for Sphinx, you would instead create a SparkleHttpSysDispatcher, while for Sparkle, you need to pass in a Sphinx "module". So, in the interactive Sphinx project, I have a DataModule with a SparkleHttpSysDispatcher, plus Sphinx, XData & Aurelius components, I guess for the two projects (i.e.: interactive & service) to share sources, a different approach would be needed, like starting with a default Delphi Windows Service wizard, not the Sparkle one?
Everything is "Sparkle": XData, Sphinx, RemoteDB, Echo, all of them are different types of Sparkle modules, and whatever technique you use for one is applicable for the others.
In this support topic we discussed how to make a Sparkle app that can behave as both VCL desktop app or Windows Service:
Ok, thanks, all is good: I just create the same DataModule in the service's OnStart, instead of the MainForm, that's all, so both projects share the same code, with very minor differences.