diff --git a/backend/server.ts b/backend/server.ts index de162085..6749c433 100644 --- a/backend/server.ts +++ b/backend/server.ts @@ -40,7 +40,7 @@ export class Server { throw error; } - const bind = 'Port ' + Config.Server.port; + const bind = Config.Server.host + ':' + Config.Server.port; // handle specific listen error with friendly messages switch (error.code) { @@ -138,7 +138,7 @@ export class Server { this.server = _http.createServer(this.app); // Listen on provided PORT, on all network interfaces. - this.server.listen(Config.Server.port); + this.server.listen(Config.Server.port, Config.Server.host); this.server.on('error', this.onError); this.server.on('listening', this.onListening); diff --git a/common/config/private/IPrivateConfig.ts b/common/config/private/IPrivateConfig.ts index c98ed3f7..c1356693 100644 --- a/common/config/private/IPrivateConfig.ts +++ b/common/config/private/IPrivateConfig.ts @@ -58,6 +58,7 @@ export interface ThreadingConfig { export interface ServerConfig { port: number; + host: string; imagesFolder: string; thumbnail: ThumbnailConfig; threading: ThreadingConfig; diff --git a/common/config/private/PrivateConfigClass.ts b/common/config/private/PrivateConfigClass.ts index bbd656e7..c13a0afd 100644 --- a/common/config/private/PrivateConfigClass.ts +++ b/common/config/private/PrivateConfigClass.ts @@ -13,6 +13,7 @@ export class PrivateConfigClass extends PublicConfigClass implements IPrivateCon public Server: ServerConfig = { port: 80, + host: '0.0.0.0', imagesFolder: 'demo/images', thumbnail: { folder: 'demo/TEMP', diff --git a/frontend/app/settings/settings.service.ts b/frontend/app/settings/settings.service.ts index f93762d8..a2e85cfa 100644 --- a/frontend/app/settings/settings.service.ts +++ b/frontend/app/settings/settings.service.ts @@ -71,7 +71,8 @@ export class SettingsService { updateTimeout: 2000 }, imagesFolder: '', - port: 80, + port: 80, + host: '0.0.0.0', thumbnail: { folder: '', qualityPriority: true,