add closure to determine environment - bootstrap/start.php