Open FanZhiheng opened 5 years ago
Hi @FanZhiheng, thank you for the transparency. You don't need to apologize — I've seen that you've been putting in the work and managing your time well.
Time management is probably one of the hardest and most important parts of MI 449 and it's something you've been doing really well. I think that will reward you well in your career! 🙂
I also completely understand that you want to put more effort into your remaining classes where you may not have as much flexibility in the how and when you do classwork. You've also shown great initiative in learning and using the skills covered in MI 449 and I'm confident you'll continue doing so once you're done with the class.
That being said, don't be stranger! If you want me to review a resume, cover letter, job application, or other projects, feel free to send them my way. You're also more than welcome to use me as a referral if you're applying to jobs. 😉
Okay, now time for your code review! You're off to a great start here and I see you're using lots of recommendations from the lesson, too. 👍
Here are some suggestions to improve your API. Can you try these out?
ejs
from package.json
It looks like ejs
has been added as a dependency in package.json
, but isn't used in your code. This won't cause harm in your code, but it will cause Heroku to download the unused dependency, which will lead to longer deployments.
Would you mind removing ejs
from package.json
?
I see that you are using npm
instead of yarn
, which is okay. To remove a package and uninstall the dependency you can run the command npm uninstall ejs
.
You have a line sending a 404 response in your code:
response.status(404).end('sorry, no such product: ' + request.params.id)
Would you mind changing this to send JSON? A good format for errors will send an object with a message, like this:
response.json({ message: request.params.id + ' not found' })
You may also want to replace the word "product" with "todo". 😉
After you’ve made your changes and pushed them to GitHub and your hosted site, give it a once-over to make sure it looks right, then comment back here and I’ll take another look.
Thanks! 🤘
@egillespie Problems fixed! Please check!
Woot, your changes look and work great. 🎉 :shipit:
Congratulations on your 4.0! 🤘🤘🤘
@egillespie Hello Eric! My name is FanZhiheng.
This project is finished. Please check!