When building a server with Express/Typescript I tend to appoint express().listen to a variable server so it can be sent as an argument to a function u
express().listen
server