Registry / web-framework / ui5-middleware-index

ui5-middleware-index

JSON →
library3.1.3jsnpmunverified

UI5 middleware for @ui5/cli that delivers a custom welcome/start page (e.g., index_peter.html) instead of a directory listing when the root path is requested. Version 3.1.3 is the latest stable, with monthly releases. Requires @ui5/cli@^3.0.0 and specVersion: "3.0" in ui5.yaml. Key differentiator: lightweight, community-maintained alternative to custom server configuration for SAP UI5 projects.

npm install ui5-middleware-index
INSTALL
IMPORT
SIG · UI5-MIDDLEWARE-IND
U
ui5-middleware-index
web-frameworkjavascriptv3.1.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ui5-middleware-index
- name: ui5-middleware-index afterMiddleware: compression configuration: welcomeFile: "index_peter.html"
- name: ui5-middleware-index path: ./node_modules/ui5-middleware-index
Configuration goes in ui5.yaml under server.customMiddleware. The name is used directly; no import in JavaScript code. Define as devDependency in package.json.
devDependency
npm install ui5-middleware-index --save-dev
npm install ui5-middleware-index --save
Should be a devDependency, not a production dependency.
welcomeFile configuration
welcomeFile: "index_peter.html"
index: "index_peter.html"
The 'index' option is deprecated since v3; use 'welcomeFile' instead.

Installs middleware and configures ui5.yaml to serve a custom welcome file instead of directory listing.

// 1. Install npm install ui5-middleware-index --save-dev // 2. Add to ui5.yaml: // server: // customMiddleware: // - name: ui5-middleware-index // afterMiddleware: compression // configuration: // welcomeFile: "index_peter.html" // 3. Create index_peter.html in your app root // 4. Run: ui5 serve // Access http://localhost:8080/ -> serves index_peter.html
ui5 --version
Debug
Known issues
breakingVersion 3.x requires @ui5/cli >=3.0.0 and specVersion: "3.0" in ui5.yaml. Older @ui5/cli versions are incompatible.
fix
Update @ui5/cli to version >=3.0.0 and set specVersion: "3.0" in your ui5.yaml.
affects: >=3.0.0
deprecatedThe 'index' configuration option is deprecated and will be removed in future versions.
fix
Use 'welcomeFile' instead.
affects: >=2.0.0
gotchaThe middleware only triggers when requesting the root path '/' with a trailing slash. Omitting the trailing slash may not redirect.
fix
Ensure URL ends with '/' or configure your browser to add trailing slash.
affects: >=1.0.0
gotchaThe middleware must be listed after 'compression' in ui5.yaml to work correctly.
fix
Set 'afterMiddleware: compression' in the middleware configuration.
affects: >=1.0.0
Errors
Common errors & fixes
Middleware 'ui5-middleware-index' is not supported by the current UI5 CLI version. Please update @ui5/cli to >=3.0.0.
Using @ui5/cli version below 3.0.0 with this middleware v3.
fix
npm install @ui5/cli@latest --save-dev
Failed to load middleware: Cannot find module 'ui5-middleware-index'
Missing npm install or not listed in package.json devDependencies.
fix
npm install ui5-middleware-index --save-dev
Configuration error: Unknown option 'index'. Use 'welcomeFile' instead.
Using deprecated 'index' option in ui5.yaml.
fix
Replace 'index' with 'welcomeFile' in the middleware configuration.
Upgrade
Version history
3.1.3latest on npm
Audit
Dependencies
@ui5/clioptionalRequired middleware runtime; must be version >=3.0.0
Agent activity
13 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
ui5-middleware-index — npm install ui5-middleware-index · libregistry