gl-ionic2-env-configuration icon indicating copy to clipboard operation
gl-ionic2-env-configuration copied to clipboard

Question about doc

Open movrack opened this issue 8 years ago • 3 comments

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

movrack avatar Dec 21 '16 15:12 movrack

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!

mvidailhet avatar Dec 21 '16 15:12 mvidailhet

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.

movrack avatar Dec 21 '16 16:12 movrack

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

mvidailhet avatar Dec 21 '16 16:12 mvidailhet