I would like to run my app locally and use the on-premise system connected via Cloud Connector (connectivity) and destination service. I was already pointed to the documentation but it is not working as expected. Is there a more detailed step-by-step tutorial available for the setup?
I followed the documentation and expected to be able to run my app using
cds watch
but it looks like the app is still trying to call the destination from my local client instead of using the ssh tunnel.
sorry we don't have a more detailed step by step guide, but I think it makes sense to extend the documentation.
Form the cds watch I guess you are using a CAP application. This should in principle be possible, but in order to minimize the sources of errors I would do the following:
I made a E2E test in the context of an other project and this snippet worked for me:
//cf enable-ssh My-App
//cf ssh MyApp -L 4711:connectivityproxy.cf.sap.hana.ondemand.com:20003
const destination = await getDestination('MyDestination',{})
destination.proxyConfiguration = {
host:'localhost',
port:4711,
headers:destination.proxyConfiguration.headers,
protocol:destination.proxyConfiguration.protocol
}
const bps = await BusinessPartner.requestBuilder().getAll().top(3).execute(destination)
Best Frank