diff --git a/packages/http/src/http.js b/packages/http/src/http.js index be9e29d..6edb407 100644 --- a/packages/http/src/http.js +++ b/packages/http/src/http.js @@ -92,7 +92,13 @@ export const createHttpServer = async (latus) => { }); } return new Promise((resolve, reject) => { - httpServer.listen(HTTP_PORT || port, HTTP_HOST || host, async (error) => { + const serverPort = HTTP_PORT || port; + const serverHost = HTTP_HOST || host; + const args = [serverPort]; + if (serverHost) { + args.push(serverHost); + } + args.push(async (error) => { if (error) { return reject(error); } @@ -101,6 +107,7 @@ export const createHttpServer = async (latus) => { resolve(); return undefined; }); + httpServer.listen(...args); }); };