export function extractPort ( url ) { if ( url ) { const backendUrlSplit = url . split ( ':' ) ; const extractedPort = parseInt ( backendUrlSplit [ backendUrlSplit . length - 1 ] , 10 ) ; return extractedPort ; } return null ; } export function getPort ( ) { return parseInt ( process . env . BACKEND_PORT , 10 ) || 3030 ; } export function getEventsServerPort ( ) { return getPort ( ) + 1 ; }