1/* Determine the port that the hub will serve on. 2 3If the environment variable PORT is set, use that port; otherwise, use port 5000. 4 5The default export of this module is the port number. 6*/ 7 8const DEFAULT_PORT = 5000; 9 10function port(): number { 11 if (process.env.PORT) { 12 return parseInt(process.env.PORT); 13 } 14 return DEFAULT_PORT; 15} 16 17export default port(); 18 19