You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the default connection is configured in a myriad of ways.
Environment values set at docker run time
Environment values set in .env file
A config.json file that sets environment values
Then a Bash script interprets all of these options and generates a defaultConnection.json file. That file is then served as a static file by the /defaultConnection endpoint in Express.
Instead, I propose simplifying the approach a bit. The /defaultConnection endpoint can read the environment values, validate them, and generate the proper JSON object to send to the client. This removes complex and brittle Bash code to parse and manipulate JSON files and provides an easier path to testing the logic. It also allows for better defaults and fallback values.
The text was updated successfully, but these errors were encountered:
kmcginnes
changed the title
[Task] Move default config generation in to server endpoint
[Task] Move default connection generation in to server endpoint
Jul 30, 2024
Currently, the default connection is configured in a myriad of ways.
.env
fileconfig.json
file that sets environment valuesThen a Bash script interprets all of these options and generates a
defaultConnection.json
file. That file is then served as a static file by the/defaultConnection
endpoint in Express.Instead, I propose simplifying the approach a bit. The
/defaultConnection
endpoint can read the environment values, validate them, and generate the proper JSON object to send to the client. This removes complex and brittle Bash code to parse and manipulate JSON files and provides an easier path to testing the logic. It also allows for better defaults and fallback values.The text was updated successfully, but these errors were encountered: