Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
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.
There are currently no FAQs about Node.js Essential Training.
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.