Use a shared function to get LWS and GWS from environment variables or config file.