- Nice clean model in your API
- This is a nice clean way to create multiple foods
- This is a clear and effective test. Tests exactly what you want. Consider setting a global constant
assert
so you don't have to typechai.assert
each time. - You've handled all your
done()
s correctly in your test. Nice work picking up on the asynchronicity. - I like how you're handling edge cases in your reponses, like this
- Nice work borrowing the "return a promise" pattern from the backend in the front end. It fits in beautifully.
- However, try to avoid refreshing the page after an AJAX call. It kind of defeats the purpose of an AJAX call 😉.
If you're goal was to write clean and functional and well tested code, then you've done it. As you said, you want to add more functionality, but you've tackled all of the real challenges already. There's going to be some challenge in adding more resources to your API, but I'm confident you can do it. I recommend working on this at least a little bit each week, so that its stays fresh, but expect to not get it to where you want until after graduation. The capstone projects are going to be the focus for the next few weeks.