Middleware for ui5-server that enables local development against SAP Cloud Foundry or XS Advanced destinations via the @sap/approuter. Version 3.9.0 requires @ui5/cli@3.0.0+ (specVersion 3.0). Community-maintained under the ui5-ecosystem-showcase organization. Provides local proxy to backend services defined in xs-app.json, with support for BTP services, authentication, content rewriting, and custom extensions. Alternatives include direct http-proxy-middleware usage, but this package integrates seamlessly with the UI5 tooling lifecycle.
npm install ui5-middleware-approuterVerified import paths — ran on the pinned version, not inferred.
Install middleware, configure ui5.yaml with a destination proxy, create minimal xs-app.json, and start ui5 server.
Update @ui5/cli to 3.0.0+ and set specVersion: '3.0' in ui5.yaml
Use xsapp_dest = '[{"name":"...","url":"..."}]'Use '^/backend/(.*)$' instead of '/backend/'
Ensure extension handler has exactly 3 parameters (req, res, next) unless using parameters map
Add server.customMiddleware configuration with approuter settings
Install @ui5/cli@3 and update specVersion in ui5.yaml to '3.0'
Create xs-app.json in project root or set xsappJson option in ui5.yaml