The Express server was referencing the DATA_KEYS file for object key names everywhere. This required an import statement in every file, and usage made the code hard to read.
Task:
Need to make the backend code easier to read. Constants are not needed throughout EVERY file, because we have tests to verify everything works.
Action:
Removed the constants file, and removed all imports throughout the express app. Instead of referencing constants, I hard coded the object keys, since they were common, like "userId"
Result:
Code was much easier to read, and we simply rely on tests to pass to know that functions are still working.
Situation:
The Express server was referencing the DATA_KEYS file for object key names everywhere. This required an import statement in every file, and usage made the code hard to read.
Task:
Need to make the backend code easier to read. Constants are not needed throughout EVERY file, because we have tests to verify everything works.
Action:
Removed the constants file, and removed all imports throughout the express app. Instead of referencing constants, I hard coded the object keys, since they were common, like "userId"
Result:
Code was much easier to read, and we simply rely on tests to pass to know that functions are still working.