Changed order for readability. Added check for process.env.PORT