cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Enabling cross container access for Nodejs function in SAP Hana XS advanced

Akshay_Nayak3
Newcomer
0 Likes
568

Hello,

Has anyone tried accessing nodejs functions from different container in SAP HANA webide (XS advanced)? There are posts about cross container access for database objects but couldn't find one for nodejs or XS functions. 

Thanks,

Accepted Solutions (0)

Answers (3)

Answers (3)

junwu
SAP Champion
SAP Champion
0 Likes
WouterLemaire
SAP Mentor
SAP Mentor
0 Likes
Savio_Dmello
Active Participant
0 Likes

One of the most straightforward way is by exposing them as HTTP-based services (e.g., REST APIs) and consuming these services in the other container.

In the source container where your Node.js function resides, create an HTTP endpoint that exposes the function.

In the target container that wants to call the function from Container 1, use HTTP client libraries like axios or request in your Node.js code to call the exposed REST API.

Note that Cross-container communication often requires proper authentication and authorization.