Detects the environment in which the application is running