How to set hosting environment name for .net core console app using Generic Host (HostBuilder)

I am setting up a .net core 2.x console app as a windows service and need to load an appsettings json file based on the environment. I was thinking to start the service with a commandline argument...