How to set a constant in aurelia by environment

前端 未结 3 689
谎友^
谎友^ 2021-01-17 15:06

I\'d like my API\'s base URL to change from dev to prod. In Angular I user to use a config.json file which was later injected into the

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-17 15:27

    I have successfully used the Aurelia-Configuration plugin to dynamically switch environments based on the domain that hosts the app

    More info https://github.com/Vheissu/Aurelia-Configuration/blob/master/README.md#get-started to do this

提交回复
热议问题