Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@ e2e tests check content is rendered correctly
npm run e2e
```


### Configuration
Config can be set in one of the three ways, _in decreasing order of precedence_ (see [app-config.service](src/app/app-config.service.ts)):
1. By returning an AppConfig with a backend `/config` endpoint
2. By serving the AppConfig stored as static asset in [/assets/config.json](src/assets/config.example.json), or
3. By exporting it from a TypeScript file from [environmets/environment.ts](src/environments/environment.ts). The `environment.ts` file gets replaced based on build configuration passed to `ng build` (See [angular.json](./angular.json)).

While many settings in AppConfig are self-explanatory, the following optional settings pertain to optional features:
- `statusCode`: Can be set to `INFO`, `WARN`, or `NONE` to show a status banner at the top of the page. The message can be set with `statusMessage`.
- `contactEmail`: If set, a message with contact email will be shown in the footer of the page.

## Deployment

Expand Down
15 changes: 15 additions & 0 deletions src/assets/config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"accessDataHref": null,
"accessInstructions": "Instructions: Login with brightness username and password",
"directMongoAccess": true,
"doiBaseUrl": "https://doi.org/",
"facility": "ess",
"lbBaseUrl": "http://localhost:3000",
"oaiProviderRoute": "http://localhost:3001",
"production": false,
"scicatBaseUrl": "http://localhost",
"showLogoBanner": true,
"statusCode": "INFO",
"statusMessage": "This is a customizable status message",
"contactEmail": "support@scicat.eu"
}
Loading