Matt
06/21/2018, 12:06 PMinstall(CORS) { anyHost() }
just when I'm running locally in developer mode -- is there a standard way to check that programatically?Deactivated User
06/21/2018, 12:09 PMif (System.getenv("ENV") != "prod") { install(CORS) { anyHost() } }
ENV=prod
when launchingMatt
06/21/2018, 12:12 PMDeactivated User
06/21/2018, 12:12 PMMatt
06/21/2018, 12:17 PMenvironment.isDev
https://stackoverflow.com/a/38816414/61298Deactivated User
06/21/2018, 12:18 PM{
"env": "${build.environment}",
// app.json...
}
is this?Matt
06/21/2018, 12:19 PMDeactivated User
06/21/2018, 12:20 PMktor {
environment = dev
environment = ${?ENV}
}
With a simple extension method we can get this value and decide or even create several extension properties that tries things like dev or prod.
What do you think?Matt
06/21/2018, 12:26 PMDeactivated User
06/21/2018, 12:30 PMMatt
06/21/2018, 12:42 PM