Topics Covered

  • Duration: 80 minutes

  • Learning Objectives:

    • Understand the module system in Node.js.

    • Learn how to use CommonJS and ES6 modules.

  • Outline:

    1. Importing and exporting modules.

    2. Core vs. third-party modules.

    3. Introduction to npm for package management.

    4. Working with package.json and dependency management​​.

  • Student Activity:

    • Write and use a custom module to calculate the factorial of a number.

    • Install a third-party package like chalk and use it to color the output of your application.

  • Homework Assignment:

    • Write a module that exports utility functions for string manipulation (e.g., reversing a string, changing case).

    • Research and list three popular npm packages used in production projects.

Last updated