Use the app-runtime service plan to consume HTML5 applications from the HTML5 Application Repository.
Application router can consume content from the HTML5 Application Repository by binding an HTML5 Application Repository service instance with app-runtime plan to the application router. In addition, the routing to the HTML5 Application Repository service is configured in the xs-app.json file.
-
Create a service instance of
app-runtimeservice plan.Example:
cf create-service html5-apps-repo app-runtime MyHtml5AppsRepoRuntimeInstance -
Bind the HTML5 Application Repository runtime instance to the application router in the
manifest.yamlfile.applications: - name: myCRMApp memory: 256M services: - MyHtml5AppsRepoRuntimeInstance -
Push the application with the following command:
cf push -
To redirect requests to the HTML5 Application Repository runtime, configure the routing to the HTML5 Application Repository service in your
xs-app.jsonfile.{ "source": "^(/.*)", "target": "$1", "service": "html5-apps-repo-rt", "authenticationType": "xsuaa" } -
HTML5 application content can be consumed from the application router using an URL in the following format:
https://<host>.<domain>/<appName>-<appVersion>/<resourcePath>appName- themanifest.json app.idwithout the dotsappVersion- themanifest.json applicationVersion.version. The appVersion is optional. If not provided, the latest version will be used.