docs icon indicating copy to clipboard operation
docs copied to clipboard

Incomplete documentation for cds.spawn example

Open martindonadiosap opened this issue 1 year ago • 1 comments

Hi colleagues,

It would be nice to detail more about the code snippet documented in this section

https://cap.cloud.sap/docs/node.js/cds-tx#cds-spawn

Where is supposed to be used this code ?

Should this be place inside a service handler? Or should this code be placed in somewhere else to be initialized when the server starts.

Could you provide a complete example for this cds.spawn ?

Thanks

martindonadiosap avatar Jul 10 '24 21:07 martindonadiosap

Hi @martindonadiosap, thanks for opening this issue.

@David-Kunz Would you be able to help?

renejeglinsky avatar Jul 11 '24 07:07 renejeglinsky

Hi @martindonadiosap ,

It's completely up to the application developer when cds.spawn is run. It could be for example during the server start (e.g. in a custom server.js file), or when a handler is triggered.

Best regards, David

David-Kunz avatar Nov 07 '24 14:11 David-Kunz

Understood, thanks @David-Kunz

martindonadiosap avatar Jan 20 '25 14:01 martindonadiosap