I'm working on a http-triggered azure function and testing locally. My azure function connects to sql database. I want to store connection strings somewhere (environment variables?) so that they do not show up in the code. And azure function can still access the connection strings like below:
server = os.getenv('SERVERNAME')
database = os.getenv('DBNAME')
username = os.getenv('DBUSER')
password = os.getenv('PWD')
I created user environment variables (SERVERNAME, DBNAME, etc) on my local computer, but the azure function doesn't not seem to be able to access those.
Does anyone know how to set those environment variables so that my azure function can access the variables using os.getenv()? I'm on windows. Thanks.


