Execution Notes:
-
the 2 databases should be called palettepicker and palettepicker_test
-
I setup the testing on a different port, so to run the test suite, run: npm run test
NOT DEPLOYED YET heroku
YES! I think I completed all of the functionality requirements.
No official extensions, but you'll notice a few niceties...plenty of error handling, default values when no palettes/projects exist...just small UX improvements...again NO OFFICAL EXTENSION ;)
NOTE: same block used for both answers (happy and sad block )
** Why were you proud of this piece of code? **
This is a pretty complex function here. There are 3 nested forEach statements, uses array prototypes reduce and filter. And also has alot of dynamic DOM element creation. Overall, I'm proud of this beast because it's pulling off some pretty neat stuff...but see next section for the sad part...
NOTE: same block used for both answers (happy and sad block )
** Why do you feel not awesome about the code? What challenges did you face trying to write/refactor it? **
I just didn't have the time to refactor this. There are clearly defined sections of logic within the entire function, and could easily be broken out into separate functions. What's tricky is the 3 nested forEaches, and moreso, all the DOM element creation that it's doing. Just didn't have the time to refactor, but I really really hate having functions this huge :(
Attach a screenshot or paste the output from your terminal of the result of your test-suite running.
There is NO seed data for DEV..only TEST environment. This is intentional to demonstrate application state with 0 projects/ 0 palettes.
The biggest area I struggled, and could use some guidance on is when sending back a response from an endpoint, when to use .status().send() vs .status().json(). Also, this impacts how the consumer of these endpoints work with the response.
x points: Lorem ipsum dolor set amet
x points: Lorem ipsum dolor set amet
x points: Lorem ipsum dolor set amet
x points: Lorem ipsum dolor set amet
x points: Lorem ipsum dolor set amet
x points: Lorem ipsum dolor set amet