#1 -- added support to import app configuration based on --env

This commit is contained in:
sthzg
2015-10-20 00:34:36 +02:00
parent 8550022eb5
commit 236012dea6
9 changed files with 57 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
# About this folder
This folder holds configuration files for different environments.
You can use it to provide your app with different settings based on the
current environment, e.g. to configure different API base urls depending on
whether your setup runs in dev mode or is built for distribution.
You can include the configuration into your code like this:
```javascript
let react = require('react/addons');
let config = require('config');
class MyComponent extends React.Component {
constructor(props) {
super(props);
let currentAppEnv = config.appEnv;
}
}
```
+7
View File
@@ -0,0 +1,7 @@
'use strict';
const config = {
appEnv: 'dev' // feel free to remove the appEnv property here
};
export default config;
+7
View File
@@ -0,0 +1,7 @@
'use strict';
const config = {
appEnv: 'dist' // feel free to remove the appEnv property here
};
export default config;
+7
View File
@@ -0,0 +1,7 @@
'use strict';
const config = {
appEnv: 'test' // don't remove the appEnv property here
};
export default config;