Skip to content

Commit

Permalink
fix: missing beacon network configuration + docs for env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Nov 26, 2024
1 parent 68bb886 commit ce38373
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ it directly.
## Prerequisites:
- Node Package Manager

## Translations in dev mode
## Development

### Adding a new environment configuration variable

Any new environment configuration variable must be registered in several places:

* [`./create_config_prod.js`](./create_config_prod.js): mapping the environment variable to a config object entry for
production
* [`./webpack.config.js`](./webpack.config.js): setting a default value for Webpack building
* [`./src/public/config.js`](./src/public/config.js): creating the shape of the global config object
* [`./src/js/config.ts`](./src/js/config.ts): loading from the global config object (production) or from the environment
via Webpack (development)

### Translations in dev mode
Add your English to French translations in `dist/public/locales/fr/translation_fr.json` for them to appear on the
website.
1 change: 1 addition & 0 deletions create_config_prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const siteConfig = {
TRANSLATED: parseBoolean(process.env.BENTO_PUBLIC_TRANSLATED),
BEACON_URL: process.env.BEACON_URL || null,
BEACON_UI_ENABLED: parseBoolean(process.env.BENTO_BEACON_UI_ENABLED),
BEACON_NETWORK_ENABLED: parseBoolean(process.env.BENTO_BEACON_NETWORK_ENABLED),

// Authentication
PUBLIC_URL: process.env.BENTO_PUBLIC_URL || null,
Expand Down
1 change: 1 addition & 0 deletions src/public/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ BENTO_PUBLIC_CONFIG = {
TRANSLATED: null,
BEACON_URL: null,
BEACON_UI_ENABLED: null,
BEACON_NETWORK_ENABLED: null,
// Authentication
PUBLIC_URL: null,
CLIENT_ID: null,
Expand Down

0 comments on commit ce38373

Please sign in to comment.