I’m new to node.js but I think It could be good for an asynchronous latex compile engine.
In other words I’d like to know if could be possible, and how, to compile a document via node.js and pdflatex.
The remote application would send the document as a JSON data structure, toghether with a template name for the end document layout.
The node.js will handle the compilation in pdf, taking the template from the file system.
Do you know if something similar, already exist?
You can spawn own child processes and thus also start latex processing. By registering appropriate listeners, you can detect the process completition or failure output:
EDIT: For creating the intermediary latex file using the provided data, I’d suggest to use a node.js template engine like mu/mustache.
So you could then pump the chunks of the template engine process as stdin to your spawned pdflatex process.