From 96d580c1146d32855e49e86beb395aae54e81bbf Mon Sep 17 00:00:00 2001 From: creadicted Date: Tue, 10 Jul 2018 08:27:37 +0200 Subject: [PATCH 1/2] Added gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 84e01b0..cd2cf1b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ node_modules coverage *.log npm-debug.log* +.idea/ From ba68708daab7df694109c38264b738f31b0003df Mon Sep 17 00:00:00 2001 From: creadicted Date: Tue, 10 Jul 2018 08:48:19 +0200 Subject: [PATCH 2/2] Removed the function call from the log statement Fixed error where server could not start since address was not defined propperly. (Maybe windows issue) --- src/api-server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api-server.ts b/src/api-server.ts index 1cd2884..02e4b7e 100644 --- a/src/api-server.ts +++ b/src/api-server.ts @@ -4,6 +4,7 @@ import * as http from 'http'; import * as path from 'path'; import * as cors from 'cors'; import controllers from './controllers'; +import {AddressInfo} from "net"; export class ApiServer { @@ -44,11 +45,10 @@ export class ApiServer { if (err) { return reject(err); } - + const address = this.server.address() as AddressInfo; // TODO: replace with Morgan call // tslint:disable-next-line:no-console - console.log(`Listening to http://${this.server.address().address}:${this.server.address().port}`); - + console.log(`Listening to http://localhost:${address.port}`); return resolve(); }); });