diff --git a/node/users/UserManagementServer.ts b/node/users/UserManagementServer.ts index 49f20c1..5da311a 100644 --- a/node/users/UserManagementServer.ts +++ b/node/users/UserManagementServer.ts @@ -1,4 +1,4 @@ -import Fastify, { FastifyInstance } from "fastify"; +import Fastify, { FastifyInstance, FastifyListenOptions } from "fastify"; import fastifyMultipart from "@fastify/multipart"; import cors from '@fastify/cors'; @@ -150,9 +150,19 @@ export class UserManagementServer async _startServer() { + let listenOptions:FastifyListenOptions = + { + port: this._settings.port + } + + if ( ! this._settings.isDebugMode ) + { + listenOptions.host = "0.0.0.0"; + } + this.app.listen( - { port: this._settings.port }, + listenOptions, ( error, address ) => { diff --git a/node/users/UserManagementServerSettings.ts b/node/users/UserManagementServerSettings.ts index 31d7699..808bf29 100644 --- a/node/users/UserManagementServerSettings.ts +++ b/node/users/UserManagementServerSettings.ts @@ -7,6 +7,7 @@ export class UserManagementServerSettings url:string; port:number = 8084; corsURLs:string[] = []; + isDebugMode:boolean = false; // Paths rootPath:string;