gl-ionic2-env-configuration
gl-ionic2-env-configuration copied to clipboard
Question about doc
When you talk about env-configuration.json file. ~~It's like prod-configuration.json and dev-configuration.json or only a single file with variables for each environment ?~~ How do you set this file ? Need some specific keys inside ?
Do you have an example of config file ?
edit:
I just re read readme.
I supose this answer me:
This will copy the file src/env-configuration/YOURENV.json to www/env-configuration.json
Hi @movrack
Yes, exactly.
The file should be named env-configuration.json and be inside the www folder. It's your configuration, so you put any key you want, there is no specific key needed.
I will update the doc and add a more detailed explanation.
Feedbacks are more than welcome!
You mean : The file must be named src/env-configiguration.json and will be copied as www/env-configuration.json.
Not I have to write env-configuration.json.
The Provider loads the env-configuration.json fil inside the www folder.
If you use the copy executable I made, you can make a configuration file for each of your environments. Just put it in the "src/env-configuration/" folder.
For example, you can have:
src/env-configuration/dev.json
src/env-configuration/prod.json
If you run:
node copy-env-config.js --env dev
Then it will copy the src/env-configuration/dev.json to www/env-configuration.json
If you run:
node copy-env-config.js --env prod
Then it will copy the src/env-configuration/prod.json to www/env-configuration.json