Learn Node.js with these 5 modules on LEARN
Tags: webdev, beginners, javascript, node
Published: 2020-07-20 18:25:07

---
title: Learn Node.js with these 5 modules on LEARN
published: true
description: This is a collection of 5 beginner modules on Node.js, that teaches everything from what Node.js is, to files management, debugging to web development.
tags: webdev, beginners, javascript, node
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/cd9ewvvxatvban6k7f9a.png
---

> This is a set of tutorials that was just released on the topic of Node.js. It takes you from the very beginning of your developer journey with Node.js to tell you the *what* and *whys* of Node.js to teaching you debugging, file management, dependency management, and even web development.

The full path is found here [LEARN module path on Node.js](https://docs.microsoft.com/en-gb/learn/paths/build-javascript-applications-nodejs/?wt.mc_id=nodepath-devto-cxa)

## -1- Introduction to Node.js

This is a great primer if you are considering to use Node.js. It will explain the *why* but also show you can use it from the command-line.

This module teaches you the following:

- **Explain** what Node.js is
- **Describe** how Node.js works
- **Identify** when to use Node.js
- **Create** and run a Node.js script from the command line

[Introduction to Node.js](https://docs.microsoft.com/en-gb/learn/modules/intro-to-nodejs/?wt.mc_id=nodepath-devto-cxa)

## -2- Create a new Node.js project and work with dependencies

Node.js has a rich ecosystem of packages that you can install and use in your app. Once installed these packages becomes dependencies that you need to learn how to manage as they will be with the project for a while. This module, therefore, teaches dependency management but also everything that goes with it like:

- **Initialize** Node.js projects
- **Understand** what the manifest file package.json consist of and use it to your advantage
- **Add and remove** packages to your Node.js project
- **Manage** your package dependencies and update them in a predictable way

[Manage dependencies](https://docs.microsoft.com/en-gb/learn/modules/create-nodejs-project-dependencies/?wt.mc_id=nodepath-devto-cxa) 

## -3- Work with files and directories

Working with files and directories is a great skill to have regardless of the programming language used. This module takes you through a lot of things that are good to know when dealing with input and output.

Sample:

```javascript
const fs = require('fs').promises;
const items = await fs.readdir("stores");
console.log(items); // [ 201, 202, sales.json, totals.txt ]
```

This module teaches you the following:

- **Work** with directories
- **Create** and delete files
- **Read** from files
- **Write** to files
- **Parse** data in files
 
[Work with files and directories](https://docs.microsoft.com/en-gb/learn/modules/nodejs-files/?wt.mc_id=nodepath-devto-cxa) 

## -4- Debugging

Being able to debug efficiently can save you a lot of time. This module takes you through all that you might possibly need to know to be really good at debugging in Node.js. The module covers the following topics: 

- **Use** VS Code debugger with a Node.js program.
- **Create** breakpoints and run your code step by step to find issues.
- **Inspect** your program state at any execution step.
- **Rewind** the call stack to find the source of an exception.

[Debugging module](https://docs.microsoft.com/en-gb/learn/modules/debug-nodejs/)

## -5- Use Express to build a Web App

Sample:

```javascript
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('Welcome to the app'))
app.listen(8000, () => console.log('Server up and running'))
```

This module teaches you the following:

- **Describe** the core concepts of the web framework Express
- **Configure** middleware to control how a request is handled
- **Respond** to HTTP requests with different types of content like text and JSON
- **Send** data to an Express endpoint
 
[Build web apps](https://docs.microsoft.com/en-gb/learn/modules/build-web-api-nodejs-express/?wt.mc_id=nodepath-devto-cxa)