Skip to content

This repository contains examples of HTML5 Applications for the SAP Cloud Platform Cloud Foundry environment. The examples show how you can use standalone application routers or HTML5 Applications Runtime managed by SAP Cloud Platform or to achieve different goals and they demonstrate the capabilities of HTML5 Application Repository service in t…

License

Notifications You must be signed in to change notification settings

SarahErdmann/multi-cloud-html5-apps-samples

 
 

Repository files navigation

Examples of HTML5 Applications for SAP Cloud Platform Multi-Cloud Environment

REUSE status

This repository contains examples of HTML5 Applications for the SAP Cloud Platform Cloud Foundry environment. The examples show how you can use standalone application routers or HTML5 Applications Runtime managed by SAP Cloud Platform or to achieve different goals and they demonstrate the capabilities of HTML5 Application Repository service in the Cloud Foundry environment.

On the Cloud Foundry environment of SAP Cloud Platform you can run an application that was uploaded to HTML5 Application Repository using one of the following options: Standalone Application Router or HTML5 Applications Runtime Managed by SAP Cloud Platform. Both options allow you to serve static content from HTML5 Application Repository, authenticate users, rewrite URLs, and forward or proxy requests to other micro services while propagating user information. However, the option that is managed by SAP Cloud Platform brings many benefits, such as:

  • Simplify and speed up your development and deployment experience
  • Save resources by running a serverless HTML5 application, which doesn’t require any application runtime
  • Lower maintenance efforts by leveraging the most up-to-date routing capabilities
  • Meet the changing demand for HTML5 applications by automatically adjusting the service to maintain consistent and predictable performance

Therefore, we recommend using the standalone Application Router only in advanced cases, for example when application router extensibility is required.

For more information, see

Before you start with the examples, please make sure that you are familiar with the basic concepts of HTML5 web apps in Cloud Foundry, such as Cloud Foundry applications, services, service bindings. For more information, see this video.

The HTML5 Application Repository can hold any UI project independent of the used framework. Use the following commands of the Cloud Foundry CLI plugin plugin to upload the HTML5 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

For information about how to upload a react-based application to the HTML5 Application Repository, see this blog post.

Requirements

  • You have an SAP Cloud Platform trial account in the region Europe (Frankfurt). For creating the trial account, see this tutorial.

  • Node.js LTS version 10 is installed: https://nodejs.org/en/download

  • Cloud Foundry Command Line tool (cf CLI) is installed. For more information, see this tutorial

  • The Multi-Target Application Cloud Foundry CLI Plugin (MultiApps CF CLI Plugin) is installed :

    cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
    cf install-plugin multiapps
    
  • GNU Make : https://www.gnu.org/software/make

    If you are running macOS or Linux it's likely that you already have Make installed. As a Windows user, please use the Chocolatey package manager to install Make via choco install make. After the installation, please check you can start the executable (make) from the terminal.

HTML5 Apps Running on a Standalone Application Router

HTML5 App Using the HTML5 Applications Runtime Managed by SAP Cloud Platform

In contrast to the examples above, there is no application router, and therefore, no application runtime is needed for these projects. The advantage is a lower total cost of ownership (TCO) and that there is no need to update the application router manually.

Known Issues

None so far :)

Support

This content is provided "as-is" with no other support.

About

This repository contains examples of HTML5 Applications for the SAP Cloud Platform Cloud Foundry environment. The examples show how you can use standalone application routers or HTML5 Applications Runtime managed by SAP Cloud Platform or to achieve different goals and they demonstrate the capabilities of HTML5 Application Repository service in t…

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 100.0%