Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In this challenge, you'll leverage Node's module caching to track some metrics on how a module is being used. The first objective for this challenge is to keep track of the number of flights created. Every time a new flight object is created, the count should go up by one. The next objective is to keep track of all the destinations served. The third objective is to export multiple functions from the module. There should be functions for creating flights, as well as getting the values we're tracking. Finally adjust app dot js.
Since you'll be exporting multiple functions from the module, you are going to have to make a few changes in the way it's used. I've included some code in the exercise files to get you started. It's located in chapter 4, video 4. This challenge should take about 10 minutes to complete. When you're done, make sure to check out my solution video where I'll show how I use Node's module caching to my advantage.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 100280 Viewers
56 Video lessons · 113245 Viewers
71 Video lessons · 82130 Viewers
131 Video lessons · 39412 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.