Scenario
You will create an application router (approuter) to route requests originating in the web browser to either the CAP service or to the UI.
Using a Standalone Application Router
For your application to run on the cloud, you need another component on top of the service and the UI. It will route the request from the web browser either to the CAP service or to the provider of the UI sources. This component also ensures that authenticated and authorized users get a token from the XSUAA service, which is also routed to the CAP service.
This component is called an "application router" (approuter). "The application router is the single point-of-entry for an application running in the Cloud Foundry environment on SAP BTP. The application router is used to serve static content, authenticate users, rewrite URLs, and forward or proxy requests to other microservices while propagating user information."1.
You can either have a standalone approuter or a managed approuter2. In this module, you are going to use the standalone approuter, because it does not lead to other service dependencies. The managed approuter is part of other SAP BTP services like the SAP Launchpad Service or the SAP Portal Service. Checkout this blog3 for more detailed information on the managed approuter versus the standalone approuter.
Task Flow
In this exercise, you will perform the following tasks:
- Create a standalone approuter.
- Configure an approuter using a JSON file.
Prerequisite
You have set up SAP authorization and trust management (XSUAA).