Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check in Java App Engine if we are on development workstation

I'd like to do this in Java Google App Engine

if(developmentMode)   foo(); else   bar(); 

Does anyone know a good way to do this?

Daniel

like image 287
supercobra Avatar asked Oct 15 '09 19:10

supercobra


1 Answers

https://cloud.google.com/appengine/docs/java/javadoc/com/google/appengine/api/utils/SystemProperty

In Java just test

SystemProperty.environment.value() == SystemProperty.Environment.Value.Production 
like image 56
Marc Hacker Avatar answered Oct 06 '22 14:10

Marc Hacker