SAP CAPM
-> npm install --save @sap/xsenv
-> install node 18
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
source ~/.bashrc
command -v nvm
nvm install 18.1.0
nvm use 18.1.0
-> npm install --legacy-peer-deps
-> manually change in package.json , @sap/cds and @sap/cds/-dk version to 7.9.0 and 7.9.2
Adjust the mta.yaml file
While most parts of the file are generated by the cds tooling, some parts have to adjusted. This includes the following:
Add an oauth2-redirect URI to the xsuaa resource configuration. Read more in SAP Note 2864831.
Add the role-collection definitions to the xsuaa resource configuration.
Extend the config section of the risk-management-auth resource in your mta.yaml file, by adding the following snippet to the config:
-> install node 18
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
source ~/.bashrc
command -v nvm
nvm install 18.1.0
nvm use 18.1.0
-> npm install --legacy-peer-deps
-> manually change in package.json , @sap/cds and @sap/cds/-dk version to 7.9.0 and 7.9.2
Adjust the mta.yaml file
While most parts of the file are generated by the cds tooling, some parts have to adjusted. This includes the following:
Add an oauth2-redirect URI to the xsuaa resource configuration. Read more in SAP Note 2864831.
Add the role-collection definitions to the xsuaa resource configuration.
Extend the config section of the risk-management-auth resource in your mta.yaml file, by adding the following snippet to the config:
============================================================
forwardAuthToken: true # <-- required to forward the JWT token from app router to srv module
cf login -a <endpoint> -u <user> -o <org> -s <space>
cf login -a https://api.cf.us10-001.hana.ondemand.com -u gaurav21.11.92@gmail.com -o 2fdc26f6trial -s dev
npm run undeploy
============================================================
backup part of mta.yml
- name: risk-management
type: approuter.nodejs
path: app/router
parameters:
keep-existing-routes: true
disk-quota: 256M
memory: 256M
requires:
- name: srv-api
group: destinations
properties:
name: srv-api # must be used in xs-app.json as well
url: ~{srv-url}
forwardAuthToken: true
- name: risk-management-auth
Comments
Post a Comment