cancel
Showing results for 
Search instead for 
Did you mean: 

How to bind html5-apps-repo-rt to local approuter for testing?

manuel_seeger
Explorer
0 Kudos

Dear experts,

I am running SAP Approuter (standalone, with some extensions) to access HTML5 UIs from the HTML5 repo. On BTP, this all works as expected.

However, I am stuck at trying to get this running locally for local development and testing of approuter. When I start my local instance, I am getting the error

'xs-app.json/routes/6: Format validation failed (A route requires access to html5-apps-repo-rt service but the service is not bound.)'

which makes sense, since I don't have the HTML5 repo bound locally.

For binding destinations and XSUAA I am using a default-env.json file locally to provide the VCAP_SERVICES variable:

{ "VCAP_SERVICES": { "xsuaa": [ { "name": "sidecar-uaa", "label": "xsuaa", "tags": ["xsuaa"], "credentials": { .....

But I can't figure out how to do the same for the HTML5 repo.

How can I bind the HTML5 repo service to a locally running instance of approuter?

Best regards,

Manuel

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
Active Contributor

Are you aware of the @sap/html5-repo-mock package?

manuel_seeger
Explorer
0 Kudos

I wasn't and I didn't mean to mock the service.

The README does get me a step further though by giving the syntax for VCAP_SERVICES: : https://www.npmjs.com/package/@sap/html5-repo-mock#default-vcap_services

Approuter now starts up locally, which is most of what I needed. However, the binding to the online HTML5 repo does still not seem to work. At least the same routes that work online only give me 404 locally with "Missing internal url for request url /html5/...." in the log.

Is there anything missing still in the default VCAP_SERVICES as stated in the README? To make true binding work?

Answers (0)