refactor: update @types/node for node version 14

This commit is contained in:
Rainer Killinger
2021-04-06 14:36:15 +02:00
parent ab30ad76c1
commit 15ac0e2f59
3 changed files with 57 additions and 52 deletions

View File

@@ -90,10 +90,16 @@ async function onError(error: { code: string; syscall: string; }) {
*/
function onListening() {
const addr = server.address();
const bind = typeof addr === 'string'
? `pipe ${addr}`
if (addr !== null) {
const bind = typeof addr === 'string'
? `pipe ${addr}`
: `port ${addr.port}`;
Logger.ok(`Listening on ${bind}`);
Logger.ok(`Listening on ${bind}`);
} else {
// tslint:disable-next-line: no-floating-promises
Logger.error(`Failed to start binding`);
}
}
configureApp(app, {elasticsearch: Elasticsearch})