> My server: > export myvar=test It depends where have you set this, is it sources by uWSGI init script? You can check if uWSGI workers have this variable in environment by reading /proc/:pid/environ.
You can instruct uWSGI to set any env variables for you, using --env option. So yes, "env = key=value" in uWSGI ini file will work. I would suggest to do it this way, it's easier to maintain your app this way. 2014-03-19 0:13 GMT+01:00 <[email protected]>: > Hi, > > I am a bit new to this but learning. I want to a password as an > environmental variable and then use this variable in my flask application. > I have the code for flask to read the environmental variable but it doesnt > seem to be able to get it. > > My server: > export myvar=test > > My application: > app.config.from_envvar('myvar') > > However, is there something else I have to do with UWSGI? For example, do > I need to do something like this so my app can access the env var because > it can't seem to see it at the moment. > > env = myvar=test > > > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > -- Łukasz Mierzwa
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
