Skip to Content
0
Jan 14, 2021 at 05:29 PM

Run Approuter with worskspace CAP service BAS

228 Views

Hi All,

I have a CAP project in BAS with a java service, freestyle ui5 app and a standalone approuter using xsuaa.

I have deployed them all in an mta and they run fine with the data showing up in the app.

However when I try to run the app router locally in BAS I can load the app but the data won't show up in the list.
I checked the network calls and the call to the local service is returning 503.

I've added the destination to the local running service in the default-env.json file and the service is running as seen below:

xs-app.json:

{
  "welcomeFile": "customerSCCUI/index.html",
  "authenticationMethod": "route",
  "routes": [
    {
      "source": "^(.*)",
      "target": "$1",
      "authenticationType": "xsuaa",
      "service": "html5-apps-repo-rt"
    },
    {
      "source": "^/odata/(.*)$",
      "authenticationType": "xsuaa",
      "destination": "SCCDest",
      "csrfProtection": false
    }
  ]
}

default-env.json:

{
  "destinations":[
    {
        "name": "SCCDest",
        "url": "https://localhost:8080",
        "forwardAuthToken": true,
        "strictSSL": false
    }
  ],
  "VCAP_SERVICES": {
    "html5-apps-repo": [
      ......
    ],
    "destination": [
      {
        "label": "destination",
        "provider": null,
        "plan": "lite",
        "name": "SCCUI_destination",
        ......
      }
    ],
    "xsuaa": [
      {
        "label": "xsuaa",
        "provider": null,
        "plan": "application",
        "name": "SCCUI_uaa",
        "tags": [
          "xsuaa"
        ],
        "instance_name": "SCCUI_uaa",
        .......
      }
    ]
  }
}

Any help would be appreciated,

Thanks

Gavin

Attachments

2co4u.png (13.0 kB)
ygaj4.png (98.6 kB)