Project

General

Profile

Actions

Task #93

closed

Frontend base configuration

Added by Radek Tomiška over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Martin Karcol
Category:
Frontend
Target version:
Start date:
08/16/2016
Due date:
% Done:

100%

Estimated time:
8.00 h
Owner:

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&gt;).

Actions #1

Updated by Radek Tomiška over 7 years ago

  • Description updated (diff)
  • Assignee set to Martin Karcol
  • Estimated time changed from 4.00 h to 8.00 h
Actions #2

Updated by Martin Karcol over 7 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.)

Actions #3

Updated by Radek Tomiška over 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF