cancel
Showing results for 
Search instead for 
Did you mean: 

Node.js to Cloudplatform Destination connection not working

Badhusha
Participant
0 Kudos
162

Hi,

I am following this tutorial for consuming the OData from the On-premise system. But while deploying, I get errors like

Not found, or page keeps on loading.

manifest.yml

---
applications:

- name: approuter-demo
  host: approuter-demo-newyears
  buildpack: nodejs_buildpack
  memory: 128M
  path: ./approuter
  health-check-type: none
  services:
    - demo-xsuaa
    - destination-lite
    - connectivity-lite

xs-app.json

{
    "routes": [
        {
            "source": "^/(.*)",
            "target": "/sap/opu/odata/sap/ZGW_EMPLOYEE_INFO_SRV/EmployeeHeaderSet",
            "destination": "NOD"
        }
    ]
}

service-instances

destination

Error

Folder structure

Thanks in advance,

Badhusha.

Accepted Solutions (0)

Answers (2)

Answers (2)

mariusobert
Developer Advocate
Developer Advocate
0 Kudos

Hi,

I think the route you defined in the xs-app.json looks off. I usually use

"source": "^(.*)",

to catch all traffic. Other than that, I'd recommend to have a look in the logs.

Badhusha
Participant
0 Kudos

Are you saying the source I have used is wrong ?

mariusobert
Developer Advocate
Developer Advocate

Sorry, I pasted the wrong source. I fixed it in above's post

Manjunath
Product and Topic Expert
Product and Topic Expert
0 Kudos

Open command prompt (or terminal on mac) and execute the following command

cf logs <appname>

As per the blog, the command is

cf logs approuter-demo

and then, open the app on web browser. This time, you should see some logs on command prompt.

You can inspect the logs for a root cause.