
npm init
{
"name": "ui5_server",
"version": "1.0.0",
"description": "node server host ui5 apps",
"main": "static_server_https.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"express": "~4.16.4",
"express-http-proxy": "~1.5.0",
"http-proxy": "~1.17.0"
},
"author": "leon li",
"license": "ISC"
}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Financial Validation Result</title>
<script>
window["sap-ushell-config"] = {
defaultRenderer: "fiori2",
renderers: {
fiori2: {
componentData: {
config: {
search: "hidden"
}
}
}
}
};
</script>
<script src="sandbox.js" id="sap-ushell-bootstrap"></script>
<!-- Bootstrap the UI5 core library -->
<script id="sap-ui-bootstrap" src="../resources/sap-ui-core.js" data-sap-ui-libs="sap.ushell, sap.collaboration, sap.m, sap.ui.layout"
data-sap-ui-theme="sap_belize" data-sap-ui-compatVersion="edge" data-sap-ui-resourceroots='{"fin.cons.vecresult": "fin.cons.vecresult/webapp/"}'
data-sap-ui-frameOptions='allow'> // NON-SECURE setting for testing environment
</script>
<script>
sap.ui.getCore().attachInit(function () {
// initialize the ushell sandbox component
sap.ushell.Container.createRenderer().placeAt("content");
});
</script>
</head>
<!-- UI Content -->
<body class="sapUiBody" id="content">
</body>
</html>
const express = require('express')
const app = express()
const proxy = require('express-http-proxy');
const httpProxy = require('http-proxy');
const odataProxy = httpProxy.createProxyServer({
target: 'https://ldai4er9.wdf.sap.corp:44300', secure: false
});
odataProxy.on('proxyReq', function (proxyReq, req, res, options) {
proxyReq.setHeader('sap-client', '500');
});
app.route('/sap/opu/odata/*$').all(function (req, res) {
odataProxy.web(req, res);
});
app.use(express.static(__dirname));
app.use('/resources/', proxy('sapui5.hana.ondemand.com/resources/', {
https: true
}));
/* app.use('/test-resources/', proxy('sapui5.hana.ondemand.com/sdk/test-resources/', {
https: true
})); */
app.listen(3000, () => console.log('Example app listening on port 3000!'))
{
"applications" : {
"FinancialValidationResult-runValidationResultforReportedData": {
"additionalInformation": "SAPUI5.Component=fin.cons.vecresult",
"applicationType": "URL",
"url": "fin.cons.vecresult/webapp/",
"description": "Financial Validation Result",
"title": "Financial Validation Result"
},
"MySecondFioriObject-display" : {
"additionalInformation" : "SAPUI5.Component=com.mycompany.MySecondFioriApplication",
"applicationType" : "URL",
"url" : "/MySecondFioriApplication",
"title" : "My Second Fiori Application",
"description" : "My second Fiori application"
}
}
}
npm install
node static_server_https.js
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
17 | |
15 | |
12 | |
11 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 |