@thinkmill/devops-env-vars
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -83,2 +83,6 @@ 'use strict'; | ||
}); | ||
// Add the IN_PRODUCTION flag which covers the live and staging environments | ||
flags.IN_PRODUCTION = (flags.IN_LIVE || flags.IN_STAGING); | ||
return flags; | ||
@@ -85,0 +89,0 @@ } |
{ | ||
"name": "@thinkmill/devops-env-vars", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Helper functions that encapsulate our treatment of environment vars for KeystoneJS apps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -138,7 +138,11 @@ Devops: Environment Variables | ||
This is totally optional but gives us a convenient convention for describing other conditions in the `config.js` file. | ||
In `staging`, for example, the structure returned by this call would be: | ||
One flag is created for each environment the app supports (usually: 'live', 'staging', 'testing' and 'development') | ||
plus a flag for 'production', which is true if the environment is 'live' or 'staging'. | ||
For example, if the `APP_ENV` was `staging`, the structure returned by the call above would be: | ||
```javascript | ||
console.log(flags); | ||
// { IN_LIVE: false, IN_STAGING: true, IN_TESTING: false, IN_DEVELOPMENT: false } | ||
// { IN_LIVE: false, IN_STAGING: true, IN_TESTING: false, IN_DEVELOPMENT: false, IN_PRODUCTION: true } | ||
``` | ||
@@ -145,0 +149,0 @@ |
20305
214
294