mirror of
https://github.com/streamwall/streamwall.git
synced 2025-12-06 01:45:37 -05:00
Add host/port override to control server
This commit is contained in:
@@ -458,12 +458,14 @@ async function initialInviteCodes({
|
||||
}
|
||||
|
||||
export default async function runServer({
|
||||
port: overridePort,
|
||||
hostname: overrideHostname,
|
||||
baseURL,
|
||||
clientStaticPath,
|
||||
}: AppOptions) {
|
||||
}: AppOptions & { hostname?: string; port?: string }) {
|
||||
const url = new URL(baseURL)
|
||||
const { hostname } = url
|
||||
const port = url.port !== '' ? Number(url.port) : 80
|
||||
const hostname = overrideHostname ?? url.hostname
|
||||
const port = Number(overridePort ?? url.port ?? '80')
|
||||
|
||||
console.debug('Initializing web server:', { hostname, port })
|
||||
const { app, db, auth } = await initApp({
|
||||
@@ -479,6 +481,8 @@ export default async function runServer({
|
||||
}
|
||||
|
||||
runServer({
|
||||
hostname: process.env.STREAMWALL_CONTROL_HOSTNAME,
|
||||
port: process.env.STREAMWALL_CONTROL_PORT,
|
||||
baseURL: process.env.STREAMWALL_CONTROL_URL ?? 'http://localhost:3000',
|
||||
clientStaticPath:
|
||||
process.env.STREAMWALL_CONTROL_STATIC ??
|
||||
|
||||
Reference in New Issue
Block a user