Skip to content

Commit

Permalink
package.json: Use UI5 Builder PoC feature branch
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomByte committed Dec 10, 2019
1 parent 89aad7e commit 0977578
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 496 deletions.
6 changes: 3 additions & 3 deletions lib/cli/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ serve.handler = async function(argv) {
const serverConfig = {
port,
changePortIfInUse,
h2: argv.h2 || argv.proxy,
h2: argv.h2,
useProxy: argv.proxy,
simpleIndex: !!argv.simpleIndex,
acceptRemoteConnections: !!argv.acceptRemoteConnections,
Expand All @@ -113,15 +113,15 @@ serve.handler = async function(argv) {
cdnUrl
};

if (serverConfig.h2) {
if (serverConfig.h2 || argv.proxy) {
const {key, cert} = await ui5Server.sslUtil.getSslCertificate(serverConfig.key, serverConfig.cert);
serverConfig.key = key;
serverConfig.cert = cert;
}

const {h2, port: actualPort} = await server.serve(tree, serverConfig);

const protocol = h2 ? "https" : "http";
const protocol = (h2 || argv.proxy) ? "https" : "http";
let browserUrl = protocol + "://localhost:" + actualPort;
console.log("Server started");
console.log("URL: " + browserUrl);
Expand Down
Loading

0 comments on commit 0977578

Please sign in to comment.