Changes the filepaths in controllers & routes to absolute filepaths through the process.cwd() method.
Adds routes/employees/index.js & routes/products/index.js to funnel the various to routes/index.js in a cleaner fashion.
Fixes typos in routes/index.js with app & router
Number of Fixes
N/A
Related Ticket(s)
N/A
Problem to Solve
Solves readability problems of ungainly filepaths with ../../../ etc.
Solves an undefined error in routes/index.js that will be thrown
Solves readability problems with routes/index.js through routes/employees/index.js & routes/products/index.js
Proposed Changes
Describe the proposed changes.
Expected Behavior
Filepaths should not throw cannot find... type errors
Steps to Test Solution
In app.js, uncomment ln 6
Run: node app.js
Expecting Error: Route.get() requires a callback function but got a [object Object]
Description
Three aims:
controllers
&routes
to absolute filepaths through theprocess.cwd()
method.routes/employees/index.js
&routes/products/index.js
to funnel the various toroutes/index.js
in a cleaner fashion.routes/index.js
withapp
&router
Number of Fixes
N/A
Related Ticket(s)
N/A
Problem to Solve
Solves readability problems of ungainly filepaths with
../../../
etc. Solves anundefined
error inroutes/index.js
that will be thrown Solves readability problems withroutes/index.js
throughroutes/employees/index.js
&routes/products/index.js
Proposed Changes
Describe the proposed changes.
Expected Behavior
Filepaths should not throw
cannot find...
type errorsSteps to Test Solution
app.js
, uncommentln 6
node app.js
Error: Route.get() requires a callback function but got a [object Object]