Digital Developer Conference: Cloud Security 2021 – Build the skills to secure your cloud and data Register free

Get started with Node.js

What is Node.js?

So, you want to run JavaScript on the server? You’ve come to the right place. Node.js is an open source, cross-platform JavaScript runtime environment for developing server-side and networking applications. This popular server platform is built on Chrome’s V8 JavaScript engine and enables you to use JavaScript code outside of a browser.

But Node.js is more than just “JavaScript on the server,” as you’ll see in this learning path.

Why Node.js

Aside from being one of the most popular programming languages on the planet, JavaScript is powerful and easy to learn (though sometimes difficult to master). And Node is, among other things, JavaScript on the server.

As a platform, Node.js is one of the most popular server platforms in existence and is the anchor of the MEAN stack. That means, if you know Node, your job prospects are good.

Node is powerful

Node.js uses a non-blocking I/O model and asynchronous programming style. While JavaScript is a single-threaded language, this poses no significant issues for well-behaved Node applications. JavaScript web developers are used to asynchronous programming in the browser through the use of callbacks, Promises, and the new async/wait syntax. Node lets you bring this experience to the server.

Node also has a secret weapon in the battle for scalability: the event loop. Using asynchronous programming techniques, combined with the event loop, which processes I/O requests in separate threads in the background, Node can achieve ludicrous mode scalability (yes, that’s a thing).

Node is a community

The Node.js community is engaged, active, and open. Code sharing is the norm in the Node community through the npm registry, where you can find lots of code to use in your applications, complete with documentation and source code.

Want to get involved? There are dozens of ways you can contribute to the already extensive body of work in the Node community.

Source code for the learning path

This Node.Js learning path has a GitHub repo that contains every example from every tutorial, so you can run the examples yourself and follow along with the material.

In addition, most tutorials have quizzes with programming exercises. The solutions for every programming exercise are included in the GitHub repo in case you get stuck.

Skill level

You should be familiar with JavaScript to get the most out of this learning path. If you’re not but have experience with other programming languages like C++, Java, C#, PHP, Python, and so forth, you should be fine.

If you have no programming experience at all, you might check some of the other great resources at IBM Developer to get you ready to take this learning path.

You need to be able to install software on your computer. You should also be familiar with using the command line on your particular platform. If you’re on MacOS, that means a Terminal window. On Windows, it’s the command prompt. On Linux, the command line.

Estimated time to complete

Approximately 2 hours.

Learning objectives

With this learning path, you:

  • Install the node program itself, along with npm for managing Node projects
  • Take a tour of Node.js, including the Node runtime, the Read-Eval-Print Loop, the non-blocking I/O model, and the npm ecosystem
  • Examine Node’s module system
  • Learn how to use the Chrome V8 profiler
  • Get an overview of promises
  • Explore event loops, including creating custom events, using streams, and passing arguments to timer callbacks
  • Join a mock Node project team, where you write your first Node.js application
  • Understand the Node package manager and Node dependency management
  • Learn about several tools that can help you test your Node applications to catch any bugs