Task #93
closedFrontend base configuration
100%
Description
Now is possible to cofigure frontend only before build in profile configuration files. After build is configuration included in app.js artifact and is not user frienly to change it. We need to include base configuration in index.html as global javascript variables or import external javascript file with this configuration, e.g.:
```
<body>
....
<section id="config">
<script>
var serverUrl = '{serverUrl}';
</script>
</section>
....
</body>
```
This configuration will be filled from profile configuration file. Property serverUrl could be overidden through gulp parameter (e.g. gulp build --serverUrl <http://server.com/api>).
Updated by Radek Tomiška over 8 years ago
- Description updated (diff)
- Assignee set to Martin Karcol
- Estimated time changed from 4.00 h to 8.00 h
Updated by Martin Karcol over 8 years ago
- Status changed from New to Resolved
ConfigLoader method getServerUrl() was changed to return global variable serverUrl, which is declared in file configUrl.js. This file with defined variable is created by task urlConfig in gulpfile.babel.js during build of application. Content of variable depends on chosen environment (production/development/etc.)
Updated by Radek Tomiška over 8 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100