Add options to override server hostname and port

This commit is contained in:
Max Goodhart
2020-06-21 01:31:21 -07:00
parent cb3fe8f94b
commit fa9606e740
2 changed files with 17 additions and 0 deletions

View File

@@ -81,6 +81,8 @@ export default async function initWebServer({
certDir,
email,
url: baseURL,
hostname: overrideHostname,
port: overridePort,
username,
password,
getInitialState,
@@ -90,6 +92,12 @@ export default async function initWebServer({
if (!port) {
port = protocol === 'https' ? 443 : 80
}
if (overrideHostname) {
hostname = overrideHostname
}
if (overridePort) {
port = overridePort
}
const { app, broadcastState } = initApp({
username,