• Home
  • Explore

18.2.7: Integrate with the Front End and Refactor: Bootcamp: UNC-VIRT-BO-FSF-PT-12-2021-U-B-TTH

courses.bootcampspot.com/courses/1110/pages/18-dot-2-7-integrate-with-the-front-end-and-refactor?module_item_id=403477

1 Users

0 Comments

4 Highlights

0 Notes

Tags

Top Highlights

  • we'll use getters to transform the data by default every time it's queried.

  • To use a getter in Mongoose, we just need to add the key get to the field we are looking to use it with in the schema

  • Just like a virtual, the getter will transform the data before it gets to the controller(s).

  • Now again, we'll need to tell the Mongoose model that it should use any getter function we've specified

Ready to highlight and find good content?

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.

AboutPrivacyTerms

© 2023 Glasp Inc. All rights reserved.