get environmental variable to connect to mongodb