-
Create an SAP Cloud Platform trial account in the region Europe (Frankfurt)
-
Node.js LTS version 10: https://nodejs.org/en/download/
-
The Cloud Foundry command line tool cf : Tutorial
-
The Multi-Target Application Cloud Foundry CLI Plugin (CF MTA Plugin) :
cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org cf install-plugin multiapps
-
Make : https://www.gnu.org/software/make/
With regards to
Make
: if you are running macOS or Linux it's likely that you'll already have make installed. For Windows users, please use the Chocolatey package manager to install make viachoco install make
. After installation, please check you can start the executable (make
) from the terminal.
- Download the source code
git clone https://github.com/SAP-samples/html5-app-repo-router cd html5-app-repo-router
- Build the project
npm install npm run build
- Deploy the project
cf deploy mta_archives/html5_router_1.0.0.mtar
You can find the URL of the app router after the deployment has been successful in the console output. It will have the following structure: https://[globalaccount-id]-[subaccount-id]-dev-html5-app-repo-router.cfapps.eu10.hana.ondemand.com.
You can change path to the default app if you wish. To do so, edit the welcomeFile
property in the xs-app.json
configuration file of the app router.
You might encounter a 503 Service Temporarily Unavailable
error when there is no HTML5 application which the defined name in the application repository.
The application repository can hold any UI project independent of the used framework. Leverage the following commands of the Cloud Foundry CLI plugin to uplaod UI apps to the application repository.
mkdir myapp
cd myapp
echo '{"sap.app":{"id":"myapp","applicationVersion":{"version": "1.0.0"}}}' > manifest.json
echo '{"routes":[{"source":"^(.*)","target": "$1","service":"html5-apps-repo-rt"}]}' > xs-app.json
cf html5-push
This blog post describes how to upload a react-based application to the HTML5 application repository.
None so far :)
This content is provided "as-is" with no other support.
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the SAP Sample Code License except as noted otherwise in the LICENSE file.