正在尝试按照本教程安装 approuter:
将 approuter 推送到 CF 时,出现错误:
2019-04-29T08:39:34.43+0200 [APP/PROC/WEB/0] ERR /home/vcap/app/approuter/lib/environment.js:19
2019-04-29T08:39:34.43+0200 [APP/PROC/WEB/0] ERR throw new Error('File not found ' + xsappFile);
2019-04-29T08:39:34.43+0200 [APP/PROC/WEB/0] ERR ^
2019-04-29T08:39:34.43+0200 [APP/PROC/WEB/0] ERR Error: File not found /home/vcap/app/xs-app.json
这是我的 manifest.yml:
---
applications:
- name: xyz
command: 'node approuter/approuter.js'
host: xyz-93deb1cd-7b72-4060-94e7-30baef85d259
path: approuter
memory: 128M
buildpack: https://github.com/cloudfoundry/nodejs-buildpack
env:
TENANT_HOST_PATTERN: 'xyz(.*).cfapps.eu10.hana.ondemand.com'
destinations: '[{"name":"service-destination", "url": "https://gfuowb4ett234agtuthorizations-srv.cfapps.eu10.hana.ondemand.com", "forwardAuthToken": true}]'
SAP_JWT_TRUST_ACL: '[{"clientid" : "*", "identityzone" : "*"}]'
services:
- my-xsuaa
- service-destination
这是我的 xs-app.json,它位于我的“approuter”文件夹中。
{
"routes": [{
"source": "/",
"target": "/",
"destination": "service-destination"
}]
}
当我将 xs-app.json 移动到预期的根文件夹中时,我收到以下错误消息:
xs-app.json/routes/0: Format validation failed (Route references unknown destination "service-destination")