-
Notifications
You must be signed in to change notification settings - Fork 0
Fix config file loading #216
Copy link
Copy link
Closed
Labels
area: uop/stfcAn issue relating to the STFC user office project.An issue relating to the STFC user office project.origin: projectAn issue relating to a project.An issue relating to a project.type: bugThe issue describes a bug report.The issue describes a bug report.
Milestone
Metadata
Metadata
Assignees
Labels
area: uop/stfcAn issue relating to the STFC user office project.An issue relating to the STFC user office project.origin: projectAn issue relating to a project.An issue relating to a project.type: bugThe issue describes a bug report.The issue describes a bug report.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In #158 we changed the CONFIG_PATH environment variable from
/FBS/config/to/config/backend-config/localThe new value has no trailing slash, and the code that combines this with NODE_ENV to get the full environment config path does a simple string concatenation. As a result, starting the backend results in the contents of the file not being read.
/config/backend-config/localdevelopment.envdoesn't exist, and should be/config/backend-config/local/development.env.The quick fix is to just add a trailing slash to CONFIG_PATH, but we should also aim to use a proper path handling library to make the path that can add slashes as required.