recently found out that CDS has now become CD&S. Made this wonderful tutorial
Everything is working. I want to add function or action in the following service
using my.bookshop as my from '../db/data-model'; service Catalog2Service { entity Books @readonly as projection on my.Books; entity Authors @readonly as projection on my.Authors; entity Orders as projection on my.Orders; // How to implement ? action applyProductDiscount ( productID:Integer, reason:String ); function getApprovalStatus(customerID:Integer) returns Boolean; }
The official documentation contains an example for JAVA annotations
How to implement it for node.js in new cd&s?
in .on() method?
srv.on( 'applyProductDiscount', function(){ console.log('11111111111') }); srv.on( 'getApprovalStatus', function(){ console.log('11111111111') });
None of them works.
Can not find the example for local SQLite in node.js. (with cds console app)
PS
Not interested in Cloud Hana example in Node.js module with express