> How do I set/get environment variables in go on appengine?
Environment variables aren't a good idea on App Engine. They aren't
shared across your app instances, and multiple requests can be running
on a single instance at once. It sounds like you want to store the
password in datastore, and cache it in a global var in the app
instance.
Dave.
> I understand that a flat file I read from or sticking this in the db will
> work. I'm asking if Google App Engine has environment variables a la heroku
> or joyent.
In Go, no. If it doesn't need to dynamically change, sticking it in a
config.go file works well. It's what we do for build.golang.org, which
is an App Engine application.
Dave.
env_variables:
DJANGO_SETTINGS_MODULE: 'myapp.settings'
--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Actually if you look at the source for build.golang.org you'll see hat we store the builder key in the datastore and retrieve it once on startup.
http://golang.org/misc/dashboard/app/build/key.go
Andrew
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.