Skip to content

Commit

Permalink
Fix nae.json property for auto resolving url
Browse files Browse the repository at this point in the history
  • Loading branch information
tuplle committed Dec 26, 2023
1 parent 8bae1fa commit 53d667a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ application to localhost. Port of the application can be changed using ```--port
#### NAE.json

The frontend application consist of side menu and a views for the application. There are some predefined views for
processes, cases, tasks and user management. Side menu items are loaded from the [eTask application server](https://github.com/netgrif/etask-backend-starter).
processes, cases, tasks and user management. Side menu items are loaded from the [eTask application server](https://github.com/netgrif/etask-backend-starter).

To configure NAE application more easily the libraries use file ```nae.json``` that is placed in root of the project.
```nae.json``` defines global application configuration like urls to backend resources, services' configurations,
Expand All @@ -68,7 +68,7 @@ routing and views.
eTask frontend application build is distributed with every release. You can download is as a [release artifact](https://github.com/netgrif/etask-frontend-starter/releases/latest),
extract it from the zip archive and run it in web server of your choice.
Content of the release artifact are only static files to be served be a web server and run in the client browser.
The project includes example of [nginx configuration](default.nginx.conf).
The project includes example of [nginx configuration](default.nginx.conf).

### Run as a container

Expand All @@ -90,3 +90,13 @@ services:
ports:
- "80:80"
```
#### Configuration
The application can be configured using environment variables. Available variables are in table below:
| Variable | Type | Default | Description |
|------------------|---------|---------|-------------------------------------------------------------------------------------------------------------------|
| AUTO_RESOLVE_URL | Boolean | true | Enable/Disable auto-resolving URL of eTask application server based on domain that this app is run. |
| LOG_LEVEL | String | DEBUG | Log level of frontend logger. Default logger pushes to browser console. Allowed values: DEBUG, INFO, WARN, ERROR |
2 changes: 1 addition & 1 deletion nae.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/@netgrif/components-core/src/schema/nae-schema.json",
"extends": "nae-default",
"autoResolveBackendUrl": false,
"autoResolveBackendUrl": true,
"providers": {
"auth": {
"address": "http://localhost:8080/api",
Expand Down
1 change: 1 addition & 0 deletions src/env.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
window['env'] = window['env'] || {};

window['env']['services-log-level'] = "${LOG_LEVEL}"
window['env']['autoResolveBackendUrl'] = "${AUTO_RESOLVE_URL}"

})(this)

0 comments on commit 53d667a

Please sign in to comment.