Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run downloaded App Router via Service Marketplace

Tags:

java

s4sdk

I downloaded XS_JSCRIPT14_10-70001363 package from Service Marketplace. Please suggest me how to run this App Router Login form with localhost I am trying with npm startcommand, but getting UAA service exception. How to handle from localhost.

like image 858
Dama Ramesh Avatar asked Dec 21 '25 00:12

Dama Ramesh


1 Answers

When you download the approuter, either via npm or service marketplace you have to provide two additional files for a basic setup inside the AppRouter directory (besides package.json, xs-app.json, etc.).

The default-services.json holds the variables that tell the approuter where to find the correct authentication server (e.g., XSUAA). You have to provide at least the clientid, clientsecret, and URL of the authorization server as part of this file like this:

{
  "uaa": {
    "url" : "http://my.uaa.server/",
    "clientid" : "client-id",
    "clientsecret" : "client-secret",
    "xsappname" : "my-business-application"
  }
}

You can get this parameters, for example, after binding on SAP Cloud Platform, CloudFoundry your application to an (empty) instance of XSUAA where you can retrieve the values via cf env <appname> from the `VCAP_SERVICES/xsuaa' properties (they have exactly the same property names).

In addition, you require the default-env.json file which holds at least the destination variable to which backend microservice you want to send the received Json Web Token to. It may look like this:

{
  "destinations": [ { 
      "name": "my-destination", "url": "http://localhost:1234", "forwardAuthToken": true 
  }]
}

Afterwards, inside the approuter directory you can simply run npm start which runs the approuter per default under http://localhost:5000. It also writes nice console output you can use to debug the parameters above.

like image 168
Philipp Herzig Avatar answered Dec 22 '25 14:12

Philipp Herzig



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!