Skip to content
CBT Nuggets
DemoBook a Demo

Get Started with Node.js Service Development

This skill covers the foundational aspects of Node.js service development, including installing and setting up Node.js and NPM, managing different Node.js versions using Node Version Manager (NVM), and running JavaScript code in the terminal using the Node.js REPL. It also demonstrates how to create a simple HTTP server using Node.js core modules and provides practical exercises to reinforce learning.

Full skill from JSNSD. Preview the IT training 23,000+ organizations trust.

55m

Skill 1 of 41 in JSNSD

Setting Up Node.js

Installing and setting up Node.js and NPM is dead simple - or is it? In this video, we start our service development journey by installing the latest versions of Node.js and NPM and see how to check our local versions.

Knowledge Check

In this context of Node versions, LTS stands for ________.

Using the Node Version Manager (NVM)

We now have the latest Node and NPM versions installed. However, your job as a Node services developer will require you to be able to switch between versions quickly and easily depending on the service you're working on. In this video, we see how to do this by installing and using NVM.

Knowledge Check

The `nvm use` command will fail unless we've already installed the version we're trying to switch to using `nvm install`

Working with Node.js in the Terminal

Next, let's take a look at how to run simple Node.js commands in the terminal, both with the Node.js REPL and the node -e command. This both gives us a great way to test our code, and also allows us to easily practice what we learn.

Knowledge Check

What will the following command output to the console? (try it for yourself): node -e "console.log("Help")"

Creating a Simple Web Server

And now, it's time for the piece de resistance - creating a simple web server using only the Node.js Core (i.e. without any additional libraries such as Express). In this video, we see how to create and run a server, as well as how to test it with the Node.js REPL.

Knowledge Check

Once we've created a Node.js core server, we can start it up by calling the ___________ method.

Challenge & Solution: Date and Time Server

Now it's time for a challenge! In this challenge, you'll be asked to use the concepts you learned in this skill to create a server that tells the client the current date and time. Watch the video for more information.

Oh, and here's the link for the Github commit. This is where you'll want to create a Codespace from in order to complete the challenge.

Finally, now that you've attempted the challenge, I'll show you the solution that I came up with and walk you through the implementation process.

As I said in the solution video, here are some other simple projects you can implement in order to practice even more:

  • A server that sends back random jokes or inspirational quotes
  • A server that keeps track of how many requests it has received and sends that back to the client - this could potentially also be used as a "take a number" server, kind of like those paper number rolls they have at the meat counter at the supermarket.
  • A "Magic 8-Ball" server that responds randomly with variations of "yes", "no", or "maybe"

Knowledge Check

How difficult was the challenge for you?

This interactive assessment is available in the full learning experience.

Want to answer questions like this yourself?
with no purchase required. Already have an account?

View Transcript

Setting Up Node.js

0:00Hi Sean here and welcome to this skill where we're going to get started with

0:03service development in Node.js

0:05and in this first video here we're going to do something very important and

0:09that is we're going to

0:11get started by setting up Node.js as well as NPM on our local computer and we

0:21're also going to see

0:22how we can better manage versions using something called NVM. Now we'll go over

0:27the terminology

0:29etc in more detail a little bit later but to get started here just know that we

0:35need to download

0:36and install Node.js so that we can run JavaScript outside the browser right

0:41this is kind of the

0:43JavaScript runtime that allows us to do that and NPM comes bundled by it by

0:49default and NPM is a

0:51pretty interesting and very very useful tool that allows us to install other

0:56people's code in the

0:57form of something called packages into our projects so if you're not familiar

1:02with those things yet

1:04never fear we'll talk about them in much more detail a little bit later but let

1:08's just get started

1:09here by installing Node.js and NPM so what you're going to want to do is head

1:14over to Node.js.org

1:16and download the LTS that is long-term support version of Node.js now one thing

1:25to just keep

1:26in mind as we get started is that the version that you're seeing here is

1:30probably different

1:31from the version that you're going to see when you go to this website because

1:36well as versions

1:37tend to do they advance right so you'll probably see 20 point something or 21

1:43point something or

1:44you might even see 30 point something who knows but anyway we're going to

1:48download the long-term

1:50support version and you can do that just by clicking this button it should

1:54automatically

1:55download it for the appropriate operating system and once you've done that once

2:01it's downloaded

2:01completely you can click on that and that should get the installer started so

2:06let's just click on

2:07continue we're going to click on continue again and agree and then we'll click

2:13install now just

2:14before I do this before I put in my password in order to start the installation

2:18process I just want

2:19to point out that this process is pretty much the same way that you would go

2:23about updating Node.js

2:24as well all right so let's just take a short detour here and what you're going

2:29to want to do

2:30in order to follow along here is just open up a terminal you can do that in

2:34either just on your

2:36computer by opening whatever your operating systems equivalent of the terminal

2:40application is on Mac

2:42or what I would recommend is to get an IDE like visual studio code and just use

2:49the built-in

2:50terminal by going to terminal and then new terminal and that should open up

2:54something that looks like

2:55this here all right so what we're going to do here is we're going to check the

2:59current version

3:01of Node.js as well as NPM to see if you already have it installed right I'm

3:05just going to show

3:06you here that I already have this installed to confirm that this is in fact

3:10going to update

3:11Node.js and NPM for me so if I run Node.V right now what that's going to do and

3:17this is Node.version

3:18by the way this prints out the current version of Node.I have installed and

3:22then NPM-V and this is

3:24the current version of NPM that I have installed so going back to the

3:28installation process what you're

3:30going to see is that that will update the versions of both Node and NPM and if

3:35you ran those commands

3:36and just saw some sort of error saying that the command node or NPM wasn't

3:41available meaning that

3:42you don't have NPM or Node installed already well this is going to install that

3:47in the first place

3:48so let me just put in my password here and if we click install software that

3:52should run for a

3:54short bit and install Node.js and NPM for me that's going to be the new version

4:01so let's click on

4:02close now and you should see that it says Node.js version 20.10.0 again you

4:08might see something

4:09different than that exact version but in my case that's the one I'm installing

4:13and then we see the

4:14NPM the NPM version which is 10.2.3 you'll see something different there as

4:19well so let's close

4:20this now and well in my case it's going to ask me if I want to move the

4:24installer to the trash

4:26which I will and let's go back now to our terminal and what you should be able

4:31to do now is rerun

4:33Node-V and see that it's now that updated version as well as NPM-V and that

4:40will be an updated version

4:42as well cool so that's how to install Node and NPM in the first place so I hope

4:49this has been

4:50informative for you and I'd like to thank you for viewing.

Using the Node Version Manager (NVM)

0:00Cool, so that's how to install node and NPM in the first place.

0:06So the next thing that we're going to take a look at is we're going to see how

0:10we can

0:10use something called the node version manager and VM, not to be confused with N

0:16PM, which

0:17is the node package manager.

0:20We're going to see how we can use this NVM thing to manage the versions of node

0:24and NPM

0:25on our computer.

0:26Now the first question you'll probably have is why do we need to bother

0:30changing the versions

0:31of node and NPM on our computer back and forth, right?

0:35In other words, if you currently have the most up to date LTS version of node,

0:40which right

0:41now again is 20.10 point zero.

0:44Well why on earth would you ever want to change that to something like 16.1

0:49point zero, right?

0:51Or you might even want to go lower than that and go back to node 10, let's say.

0:55Well, the reason that you might want to do this, and this is very, very

0:59important as

1:00a services developer, the reason that you might want to do that is because

1:05certain pieces

1:06of code might have been written for a specific version of node, right?

1:11In other words, if you're working on an application that's, let's say maybe

1:15five years old, then

1:16chances are that application isn't going to be designed for the latest version

1:22of node,

1:23right?

1:24But you would probably want to do in that case just to create a solid local

1:29testing environment

1:30is you'd want to go back to whatever that version was and NVM can help you do

1:35that.

1:36So let's see how to get started here with NVM.

1:39Now NVM by the way is an open source project.

1:43You can find it on GitHub under NVM SH slash NVM.

1:48And if you scroll down here, you should be able to find the instructions for

1:52installing

1:53this locally.

1:55In my case, that's going to be right here, right?

1:57You can see that it's under the heading, installing and updating.

2:01And in my case, I'm just going to use this C URL command.

2:05And that's basically going to download the install script, which will run and

2:09install

2:10NVM on my computer.

2:11So I'm just going to copy this.

2:13We'll just click copy.

2:14And then I'm going to go back to my terminal and paste it.

2:18And if you hit enter, it should run for a little bit.

2:21In my case, you may see that it says NVM is already installed.

2:25Now again, you probably didn't have NVM installed already.

2:29So you might see something, you might see output that looks a little bit

2:32different from

2:33what we see here.

2:35But at this point, you should have NVM installed.

2:39So the next thing that you're going to want to test is whether or not that

2:43installed successfully.

2:45So the way that you can do that is very similar to what we did with node and N

2:50PM.

2:50And that is by running NVM dash V.

2:55All right.

2:56Now, in my case, what you're going to see is it says NVM dash V. And in your

2:59case, you'll

2:59probably see this as well.

3:01Now that's just because in general, when you run some kind of install script

3:05like we just

3:06did, you actually need to either restart your terminal or manually source,

3:12whatever you

3:13just installed in order for those changes to take effect and be able to use

3:16that new

3:16command.

3:17All right.

3:18So we're going to do that.

3:20And we're going to do that.

3:21And we're going to do that.

3:22And we're going to do that.

3:23And we're going to do that.

3:24And we're going to do that.

3:25And we're going to do that.

3:26And we're going to do that.

3:27And we're going to do that.

3:28And we're going to do that.

3:29And we're going to do that.

3:30And we're going to do that.

3:31And we're going to do that.

3:32And we're going to do that.

3:33And we're going to do that.

3:34And we're going to do that.

3:35And we're going to do that.

3:36And we're going to do that.

3:37And we're going to do that.

3:38And we're going to do that.

3:39And we're going to do that.

3:40And we're going to do that.

3:42And we're going to do that.

3:43And we're going to do that.

3:44And we're going to do that.

3:45And we're going to do that.

3:46And we're going to do that.

3:47And we're going to do that.

3:48And we're going to do that.

3:49And we're going to do that.

3:50And we're going to do that.

3:51And we're going to do that.

3:52And we're going to do that.

3:53And we're going to do that.

3:54And we're going to do that.

3:55And we're going to do that.

3:56And we're going to do that.

3:57And we're going to do that.

3:58And we're going to do that.

3:59And we're going to do that.

4:00And we're going to do that.

4:01And we're going to do that.

4:02And we're going to do that.

4:03And we're going to do that.

4:05And we're going to do that.

4:06And we're going to do that.

4:07And we're going to do that.

4:08And we're going to do that.

4:09And we're going to do that.

4:10And we're going to do that.

4:11And we're going to do that.

4:12And we're going to do that.

4:13And we're going to do that.

4:14And we're going to do that.

4:15And we're going to do that.

4:16And we're going to do that.

4:17And we're going to do that.

4:18And we're going to do that.

4:19And we're going to do that.

4:20And we're going to do that.

4:21And we're going to do that.

4:22And we're going to do that.

4:23And we're going to do that.

4:24And we're going to do that.

4:25And we're going to do that.

4:26And we're going to do that.

4:28And we're going to do that.

4:29And we're going to do that.

4:30And we're going to do that.

4:31And we're going to do that.

4:32And we're going to do that.

4:33And we're going to do that.

4:34And we're going to do that.

4:35And we're going to do that.

4:36And we're going to do that.

4:37And we're going to do that.

4:38And we're going to do that.

4:39And we're going to do that.

4:40And we're going to do that.

4:41And we're going to do that.

4:42And we're going to do that.

4:43And we're going to do that.

4:44And we're going to do that.

4:45And we're going to do that.

4:46And we're going to do that.

4:47And we're going to do that.

4:48And we're going to do that.

4:49And we're going to do that.

4:51And we're going to do that.

4:52And we're going to do that.

4:53And we're going to do that.

4:54And we're going to do that.

4:55And we're going to do that.

4:56And we're going to do that.

4:57And we're going to do that.

4:58And we're going to do that.

4:59And we're going to do that.

5:00And we're going to do that.

5:01And we're going to do that.

5:02And we're going to do that.

5:03And we're going to do that.

5:04And we're going to do that.

5:05And we're going to do that.

5:06And we're going to do that.

5:07And we're going to do that.

5:08And we're going to do that.

5:09And we're going to do that.

5:10And we're going to do that.

5:11And we're going to do that.

5:12And we're going to do that.

5:14And we're going to do that.

5:15And we're going to do that.

5:16And we're going to do that.

5:17And we're going to do that.

5:18And we're going to do that.

5:19And we're going to do that.

5:20And we're going to do that.

5:21And we're going to do that.

5:22And we're going to do that.

5:23And we're going to do that.

5:24And we're going to do that.

5:25And we're going to do that.

5:26And we're going to do that.

5:27And we're going to do that.

5:28And we're going to do that.

5:29And we're going to do that.

5:30And we're going to do that.

5:31And we're going to do that.

5:32And we're going to do that.

5:33And we're going to do that.

5:34And we're going to do that.

5:35And we're going to do that.

5:37And we're going to do that.

5:38And we're going to do that.

5:39And we're going to do that.

5:40And we're going to do that.

5:41And we're going to do that.

5:42And we're going to do that.

5:43And we're going to do that.

5:44And we're going to do that.

5:45And we're going to do that.

5:46And we're going to do that.

5:47And we're going to do that.

5:48And we're going to do that.

5:49And we're going to do that.

5:50And we're going to do that.

5:51And we're going to do that.

5:52And we're going to do that.

5:53And we're going to do that.

5:54And we're going to do that.

5:55And we're going to do that.

5:56And we're going to do that.

5:57And we're going to do that.

5:58And we're going to do that.

6:00And we're going to do that.

6:01And we're going to do that.

6:02And we're going to do that.

6:03And we're going to do that.

6:04And we're going to do that.

6:05And we're going to do that.

6:06And we're going to do that.

6:07And we're going to do that.

6:08And we're going to do that.

6:09And we're going to do that.

6:10And we're going to do that.

6:11And we're going to do that.

6:12And we're going to do that.

6:13And we're going to do that.

6:14And we're going to do that.

6:15And we're going to do that.

6:16And we're going to do that.

6:17And we're going to do that.

6:18And we're going to do that.

6:19And we're going to do that.

6:20And we're going to do that.

6:21And we're going to do that.

6:23And we're going to do that.

6:24And we're going to do that.

6:25And we're going to do that.

6:26And we're going to do that.

6:27And we're going to do that.

6:28And we're going to do that.

6:29And we're going to do that.

6:30And we're going to do that.

6:31And we're going to do that.

6:32And we're going to do that.

6:33And we're going to do that.

6:34And we're going to do that.

6:35And we're going to do that.

6:36And we're going to do that.

6:37And we're going to do that.

6:38And we're going to do that.

6:39And we're going to do that.

6:40And we're going to do that.

6:41And we're going to do that.

6:42And we're going to do that.

6:43And we're going to do that.

6:44And we're going to do that.

6:46And we're going to do that.

6:47And we're going to do that.

6:48And we're going to do that.

6:49And we're going to do that.

6:50And we're going to do that.

6:51And we're going to do that.

6:52And we're going to do that.

6:53And we're going to do that.

6:54And we're going to do that.

6:55And we're going to do that.

6:56And we're going to do that.

6:57And we're going to do that.

6:58And we're going to do that.

6:59And we're going to do that.

7:00And we're going to do that.

7:01And we're going to do that.

7:02And we're going to do that.

7:03And we're going to do that.

7:04And we're going to do that.

7:05And we're going to do that.

7:06And we're going to do that.

7:07And we're going to do that.

7:09And we're going to do that.

7:10And we're going to do that.

7:11And we're going to do that.

7:12And we're going to do that.

7:13And we're going to do that.

7:14And we're going to do that.

7:15And we're going to do that.

7:16And we're going to do that.

7:17And we're going to do that.

7:18And we're going to do that.

7:19And we're going to do that.

7:20And we're going to do that.

7:21And we're going to do that.

7:22And we're going to do that.

7:23And we're going to do that.

7:24And we're going to do that.

7:25And we're going to do that.

7:26And we're going to do that.

7:27And we're going to do that.

7:28And we're going to do that.

7:29And we're going to do that.

7:30And we're going to do that.

7:32And we're going to do that.

7:33And we're going to do that.

7:34And we're going to do that.

7:35And we're going to do that.

7:36And we're going to do that.

7:37And we're going to do that.

7:38And we're going to do that.

7:39And we're going to do that.

7:40And we're going to do that.

7:41And we're going to do that.

7:42And we're going to do that.

7:43And we're going to do that.

7:44And we're going to do that.

7:45And we're going to do that.

7:46And we're going to do that.

7:47And we're going to do that.

7:48And we're going to do that.

7:49And we're going to do that.

7:50And we're going to do that.

7:51And we're going to do that.

7:52And we're going to do that.

7:53And we're going to do that.

7:55And we're going to do that.

7:56And we're going to do that.

7:57And we're going to do that.

7:58And we're going to do that.

7:59And we're going to do that.

8:00And we're going to do that.

8:01And we're going to do that.

8:02And we're going to do that.

8:03And we're going to do that.

8:04And we're going to do that.

8:05And we're going to do that.

8:06And we're going to do that.

8:07And we're going to do that.

8:08And we're going to do that.

8:09And we're going to do that.

8:10And we're going to do that.

8:11And we're going to do that.

8:12And we're going to do that.

8:13And we're going to do that.

8:14And we're going to do that.

8:15And we're going to do that.

8:16And we're going to do that.

8:18And we're going to do that.

8:19And we're going to do that.

8:20And we're going to do that.

8:21And we're going to do that.

8:22And we're going to do that.

8:23And we're going to do that.

8:24And we're going to do that.

8:25And we're going to do that.

8:26And we're going to do that.

8:27And we're going to do that.

8:28And we're going to do that.

8:29And we're going to do that.

8:30And we're going to do that.

8:31And we're going to do that.

8:32And we're going to do that.

8:33And we're going to do that.

8:34And we're going to do that.

8:35And we're going to do that.

8:36And we're going to do that.

8:37And we're going to do that.

8:38And we're going to do that.

8:39And we're going to do that.

8:41And we're going to do that.

8:42And we're going to do that.

8:43And we're going to do that.

8:44And we're going to do that.

8:45And we're going to do that.

8:46And we're going to do that.

8:47And we're going to do that.

8:48And we're going to do that.

8:49And we're going to do that.

8:50And we're going to do that.

8:51And we're going to do that.

8:52And we're going to do that.

8:53And we're going to do that.

8:54And we're going to do that.

8:55And we're going to do that.

8:56And we're going to do that.

8:57And we're going to do that.

8:58And we're going to do that.

8:59And we're going to do that.

9:00And we're going to do that.

9:01And we're going to do that.

9:02And we're going to do that.

9:04And we're going to do that.

9:05And we're going to do that.

9:06And we're going to do that.

9:07And we're going to do that.

9:08And we're going to do that.

9:09And we're going to do that.

9:10And we're going to do that.

9:11And we're going to do that.

9:12And we're going to do that.

9:13And we're going to do that.

9:14And we're going to do that.

9:15And we're going to do that.

9:16And we're going to do that.

9:17And we're going to do that.

9:18And we're going to do that.

9:19And we're going to do that.

9:20And we're going to do that.

9:21And we're going to do that.

9:22And we're going to do that.

9:23And we're going to do that.

9:24And we're going to do that.

9:25And we're going to do that.

9:27And we're going to do that.

9:28And we're going to do that.

9:29And we're going to do that.

9:30And we're going to do that.

9:31And we're going to do that.

9:32And we're going to do that.

9:33And we're going to do that.

9:34And we're going to do that.

9:35And we're going to do that.

9:36And we're going to do that.

9:37And we're going to do that.

9:38And we're going to do that.

9:39And we're going to do that.

9:40And we're going to do that.

9:41And we're going to do that.

9:42And we're going to do that.

9:43And we're going to do that.

9:44And we're going to do that.

9:45And we're going to do that.

9:46And we're going to do that.

9:47And we're going to do that.

9:48And we're going to do that.

9:50And we're going to do that.

9:51And we're going to do that.

9:52And we're going to do that.

9:53And we're going to do that.

9:54And we're going to do that.

9:55And we're going to do that.

9:56And we're going to do that.

9:57And we're going to do that.

9:58And we're going to do that.

9:59And we're going to do that.

10:00And we're going to do that.

10:01And we're going to do that.

10:02And we're going to do that.

10:03And we're going to do that.

10:04And we're going to do that.

10:05And we're going to do that.

10:06And we're going to do that.

10:07And we're going to do that.

10:08And we're going to do that.

10:09And we're going to do that.

10:10And we're going to do that.

10:11And we're going to do that.

10:13And we're going to do that.

10:14And we're going to do that.

10:15And we're going to do that.

10:16And we're going to do that.

10:17And we're going to do that.

10:18And we're going to do that.

10:19And we're going to do that.

10:20And we're going to do that.

10:21And we're going to do that.

10:22And we're going to do that.

Working with Node.js in the Terminal

0:00All right, so now that we've seen the basics of installing node JS and NPM and

0:04we've also seen how to use the node version manager to switch between versions

0:10of node and NPM pretty rapidly.

0:13The next thing that I want to show you is how we can run snippets of node JS

0:17code, right? That is JavaScript code.

0:20Well, two ways really that we can run JavaScript code in the terminal.

0:25Now the first way here and this way is very, very useful when you want to test

0:29out snippets of code, you want to make sure that you understand the syntax of

0:34JavaScript, right? Sometimes it happens to me where, you know, I get mixed up

0:38with the syntax and I run into some kind of syntax error.

0:41So I want to actually run that piece of JavaScript code in the terminal to try

0:46and play around with it and see if I can get it right. Well, you can do that

0:51all by opening up the node JS terminal and you can do that just by running node

0:57with nothing after it in your terminal.

1:00And by the way, in case you haven't caught on to this yet, I'm going to be

1:03using visual studio code for all of these demonstrations. If you want to

1:06download that, your best bet's just going to be to Google download visual

1:10studio code, and that should take you right there.

1:14So anyway, once you've done that, again, you can open up a new terminal here by

1:18going to terminal new terminal. That should get you to where I am right now.

1:22So let's run the node command now. And what you're going to see is that's going

1:27to say welcome to node JS V 20 point 10 point zero, right? That's the currently

1:33active version of node JS that we installed using NVM.

1:38And instead of the normal terminal, what you can see here is this is basically

1:43just a little terminal that we get to run node JS snippets in right so

1:48basically again JavaScript code.

1:51So first things first, let's just try console.log Hello.

1:56And what we're going to see there is sure enough, it'll print out hello to the

1:59console and underneath that you're going to see this undefined thing.

2:03Basically, all that that means is this is the return value of whatever

2:08statement, whatever code we just ran in the terminal. And since console.log

2:13doesn't return anything, that's why we're seeing undefined.

2:17All right. Cool. So anyway, now that we've, now that we've opened up the node

2:22JS console, let's try something a little bit more interesting.

2:26And I really want to tie this back in with the whole node version manager thing

2:30and working with different node versions.

2:33Let's try something here that's going to be a little bit different depending on

2:37the version of node JS that we currently have active.

2:41So what I'm going to do is I'm going to say const util equals require util. All

2:47right.

2:48And then I'm going to say const read file promise equals util.promise if I, and

2:58then I'm going to call that on require FS dot read file and the read file is on

3:06require FS.

3:08And then basically what this is going to do is it's going to convert this

3:14normal read file operation, right?

3:17This read file function on the FS package into a promise, right?

3:22It's going to convert it from a callback based function to a promise based

3:26function.

3:27And the thing about this is if we run it here, it should work just fine, right?

3:31We can now say read file promise, and then we'll pass some kind of code into it

3:37and you might want to actually create a file that we can read here.

3:40And by the way, what I did here is I just created a new directory called JS NSD

3:45example code.

3:47If you just create a new file here and call it something like my file dot TXT.

3:53And then we'll just add something to this file. We'll say hello from a file.

3:58All right, well, we should be able to read the contents of this file now by

4:03saying read file promise my file dot TXT.

4:06And we'll add the UTF-8 encoding there.

4:11And by the way, if you're not familiar with these functions, I'm not going to

4:13be going over the specific details of doing things like reading files and Node.

4:17js, etc.

4:18That's something that you can find by taking a look at one of my other Node.js

4:22basics courses.

4:24So feel free to check that out. But anyway, what this is going to allow us to

4:29do now is say dot then.

4:31And this will give us access to the contents of the file, which we can just log

4:35out to the console.

4:37We'll say something like contents, and then we'll say contents or console dot

4:41log rather.

4:42Contents, okay. So if we close that function off and hit enter, sure enough

4:48what we'll see is after this promise thing, which is the return value of read

4:53file promise.

4:53Etc. We see that it prints out hello from a file to the console.

4:58Now where I'm going with all of this is this code worked because we have the

5:03current version of Node.js that we have.

5:07However, if we were running a different version of Node.js, things wouldn't

5:11work out quite as well.

5:13All right, so what I'm going to do is exit out of the node terminal, which you

5:16can do with control C, pressing that twice.

5:20That is, and I'm going to change the version of Node.js that we're using to

5:24something quite a while back.

5:26So actually, what we're going to do is we're going to say NVM LS so that we can

5:30see the old old versions of NPM that we can install or of Node rather.

5:35So let's install Argon. This one is by all appearances, the oldest one we're

5:39able to install.

5:40So let's try saying NVM install. We can just use LTS and ups I spelled install

5:46wrong LTS slash Argon.

5:49And that should install version 4.9.1, very old version, and basically set that

5:55as the current version of Node, which we can verify by saying Node-V.

6:01And sure enough, we see 4.9.1.

6:05So let's open the terminal back up and we're going to try doing the same thing

6:08that we just did, right?

6:10Promissifying and reading a file, and it's just not going to work.

6:14You'll see how exactly in just a minute, but let's just open up that terminal

6:18by saying Node.

6:20And if we try running our code again, and by the way, you can do that just by

6:23using the up arrow, let's scroll back up to this const read file promise equals

6:29util.promissify thing.

6:31Now, one thing that's interesting to note is that you don't actually need to

6:35import util here because it's just included in the scope by default.

6:41But if we try and run this file, what we'll see is that it says util.promissify

6:45is not a function.

6:47Now, the reason that you're seeing this error here when the code worked before

6:51is because in this older version of Node, there was no function called promise

6:56ify on util, right?

6:58It hadn't been added yet.

7:00Whereas as we already saw in a more recent version, a very recent version, in

7:04fact of Node.js, that function worked just fine.

7:07So this is just one example of many different pieces of code that will either

7:12work slightly differently or not at all in different versions of Node.js, which

7:19again just kind of underlines the importance of using the correct version and

7:24node and being able to switch between those versions with NVM.

7:28So anyway, now that we've seen how to run code in the Node terminal and just

7:32some implications of running code under different Node versions, let's switch

7:37back to the later version.

7:39And we can do that by saying NVM use and we can use its alias here.

7:43We'll say LTS slash iron.

7:46And that will give us 20.10.0.

7:49And by the way, in case I didn't mention this, I don't think I did.

7:52Another advantage of using these nerdy aliases here is that it will actually

7:57give you the latest update on a given version branch.

8:02Right, so if you want to picture the way that Node versions work like this,

8:07basically the way that they work is for any given Node version, let's say four,

8:12five, six, all the way through.

8:15Here we have 18, 19, 20. Well, obviously each version sort of builds off of and

8:22improves the one before it, right? So 20 builds off of 19, 19 builds off of 18,

8:28all the way down the chain, right?

8:31However, because of the fact that given a specific version of Node JS, there

8:35are many, many applications that are dependent on that version and require that

8:41exact runtime in order to run correctly.

8:44Each of these versions is kept around and improved just sort of as an

8:49independent branch. Right, so even after Node JS version 20 is released, there

8:56's still going to be changes and improvements on 18, 19, all the way through.

9:00So by using those aliases, right, by referring to LTS slash iron or LTS slash

9:08Argon or whatever, that's going to bring you to the latest release on that

9:15branch.

9:16So in other words, you're not going to need to keep your eye on the Node JS

9:19news for when 20.10.1 comes along. You can just refer to it by its alias and

9:24that will make sure that you're using the latest version in that branch.

9:29So anyway, now that we've switched back to a modern version, a much more modern

9:34version of Node JS, that is, let's run another piece of code here.

9:39And this is going to be basically just a command that we type into our terminal

9:43. So what this command is going to be, it's going to be at node dash E.

9:48And then in double quotes, we're going to say something like console.log. Hello

9:53. All right. Not a not the most exciting piece of code around, but there is a

9:56point here as you'll see.

9:58And if we hit enter, what we're going to see is that sure enough, hello gets

10:01printed out to the console. Now this node dash, anything, what this does.

10:07And the dash E stands for execute, by the way, is it will execute whatever code

10:12we have in this string. So this is basically a way of running individual small

10:18pieces of Node JS code, right?

10:21So this is a server side JavaScript code without actually having to open up a

10:27node terminal and type commands into there, right, without having to open up

10:31the read evaluate print loop, our EPL, as that's often referred to.

10:36All right. Now the reason that I'm showing you these things, right, how to use

10:40node dash E and how to use the node terminal in order to run just basic

10:44snippets of JavaScript code is because these are two very useful tools

10:50for testing the web servers that you create with Node JS, right? So what we're

10:55going to see very shortly is how to create a basic server using Node JS as well

11:00as several Node JS libraries, such as Express and Fastify.

11:06Well, if we have a server running here that we want to test, we need some way

11:10of sending requests to that server so that we can see how that server behaves

11:15and what data it responds with.

11:18Well, there are obviously lots of options for what we can have over here on the

11:22client side sending those requests. Well, in many cases, the easiest option is

11:28to have that thing on the client side be another piece of JavaScript code,

11:33right?

11:34So using what we just saw, if we have a server running over here again, and we

11:38want to send a request to it, we can just write a little piece of JavaScript

11:43code that will actually send a request to that server, and we'll be able to see

11:48there right in the console, what that response was, and we'll be able to do

11:52things like manipulate the response, look at it in more detail, etc.

11:56In that case, we just have this little console thing that's making that request

12:01and basically processing the response that we're getting.

12:05Anyway, to make a long story short, the reason I showed you those two ways of

12:10executing server side JavaScript code is that frankly they just make great

12:14testing tools.

12:16So anyway, I hope this has been informative for you, and I'd like to thank you

12:19for viewing.

Creating a Simple Web Server

0:00All right, so at this point, we've got pretty much everything set up and we've

0:04covered pretty much all of the topics that are going to lead us up to the main

0:09feature of this section.

0:11And that is creating a simple web server using Node.js.

0:16All right, now a server is really going to be the main unit that we end up

0:20building our services out of, right?

0:23So really all that a server is is a program that sits there and listens for

0:28requests, right?

0:30These are incoming messages, if you will, from somewhere on the Internet, right

0:36?

0:36Somewhere across the Internet.

0:38And when the server receives a request, it's going to execute some sort of some

0:43piece of code and it's going to send some sort of response back to whoever sent

0:49that request.

0:51Now the cool thing, and this is something that we'll get into later, is you can

0:55actually have an application that consists of multiple servers, right?

1:01So you could have, let's say, three or four or a hundred servers, and these

1:07servers can actually talk to each other as well as to external clients, right?

1:13So in other words, this server here might get a request from some client, and

1:18in order to complete that task, right?

1:21In order to do whatever it is that this client wants it to do, it might have to

1:25communicate with these other servers.

1:28So it might have to send its own request to this server here, that server might

1:32respond, then it might have to send a request to this one here.

1:36This one then might have to send a request to this one, and so on and so forth.

1:40So as you can see, you can create some very interesting structures here, all

1:45right?

1:45And there are benefits to structuring your applications like this versus just

1:50having a single server that contains all of that functionality.

1:55And that's something, again, that we'll talk about later, but I just wanted to

1:59show you kind of what a server is and how it fits into this whole idea of

2:04service development in Node.js.

2:07So, and by the way, this server here at some point, if it all goes well, would

2:11send back a response to the original client.

2:15Cool. So anyway, with all that said, it's obviously going to be very important

2:20that we know how to set up and run a basic Node.js server.

2:25So let's take a look at how to do that.

2:28Now, obviously it's possible to set up a server just in your terminal.

2:32You could do that if you wanted to, right? You could just run the node command

2:36and then set up and run a server from here.

2:40However, that's really not the best way to go about things because, well, you

2:45're probably going to want to have the code for that server in a reusable format

2:51, which is why not surprisingly, we generally create our servers inside a

2:55JavaScript file.

2:57So let's create a new file here. And again, I'm just, I created this JS NSD

3:02example code directory. And you might want to do that as well.

3:06Just create a directory to hold all of your code. And let's create a new file

3:10inside of here. And we'll call this something like core node server.js.

3:17But the reason that I'm specifying core node server is because, as we'll see in

3:22later skills, there are plenty of frameworks in Node.js that greatly simplify

3:29the task of creating and running a server.

3:33But, you know, just to start at the very beginning here, we're going to see how

3:37to create a server without any other frameworks, without any other libraries.

3:42And, well, this is basically what all of those frameworks and libraries are

3:45built off of in the first place. So it's probably a good idea to at least see

3:49how this works.

3:50So really the main thing, the main package that you're going to be using when

3:56you're creating a core node server, right, with only the node.js core packages

4:02is HTTP.

4:04So what we're going to do is we're going to say const HTTP equals require HTTP.

4:10All right. And then what we're going to do is we're going to create a server by

4:16saying const server equals HTTP dot create server.

4:19Now, not surprisingly, this create server function is going to create a server

4:24that will then be able to start up and that will basically just sit there and

4:28listen for requests.

4:30So the way that we start up a server is by saying server dot listen, and we get

4:36to specify something called the port. Basically, this port is basically just a

4:42number that allows us to distinguish between different connections or different

4:48services

4:48as we'll see later on that are running on the same computer. So as you'll see,

4:52when we actually create applications that are made up of multiple servers, we

4:57're going to need to have this port number, which for now we'll just use

5:01something like 3000, which is a pretty commonly used port number at least for

5:06development.

5:06We're going to have to come up with different numbers for each of those

5:09different servers, right, so we might need to have one server running on port

5:143000, one server running on port 8000 and one server running on port 8080. Let

5:20's say.

5:20All right, so anyway, once we've started our server, we're probably going to

5:24want some sort of output in the console in order to let us know that the server

5:28has started up successfully.

5:30And the way that we do that is by passing a callback function as the second

5:35argument to server dot listen.

5:38And that's going to look like this. We're just going to use a arrow function,

5:42and we'll say console dot log, and we'll print out something like server is

5:48listening on port 3000.

5:50Okay, and that is pretty much all we need to do except at this point our server

5:54isn't actually going to do anything right we've told our server to start

5:58listening but obviously, you know, when a server receives a request as we said,

6:04right, when we have our server and a request comes in,

6:07we're going to want to have some sort of code that gets executed and sends back

6:11a response to whoever the client was that's a really poorly drawn computer

6:16there but anyway you get the idea.

6:19So the way that we do that, and this is going to be a very popular way of doing

6:23things in case you're not familiar with working with no JS, we're going to

6:28define another callback function and pass that to HTTP dot create server so

6:34here's what this is going to look like we're just going to have

6:36a simple callback function. And inside here will print something out to the

6:40console by saying something like console dot log.

6:43I received a request.

6:48Okay, and that's all we're going to do right now. Now this is not really a

6:52complete implementation for this callback function because as you'll see in

6:57just a minute, it doesn't send back any kind of any kind of response to the

7:02client.

7:03We'll see how to do that in a minute as well. But nevertheless, it will do

7:07something when it receives a request. So what we're going to do here is we're

7:12going to run our server that we just created by saying node core node server

7:18dot JS, right, this is going to run our server file.

7:21And if we hit enter, what you'll see is that it prints out server is listening

7:25on port 3000, and then it just sort of sits there, right? Well, the reason that

7:30it's doing that is because generally the server programs that we create will

7:35run continuously, right, so unlike regular node JS scripts or scripts of any

7:42other programming language for that matter.

7:44When we create servers, that server is just going to run continuously, usually

7:49until we manually stop it or it crashes, let's say.

7:54So right now, again, our server is just sitting there, waiting for some sort of

7:59request to come in.

8:01So let's test this thing out now by sending a request to it.

8:05Now, the probably the easiest way to test this out is a way that we saw in a

8:11previous video here, and that is to just open up a new terminal and go to the

8:17node, reevaluate print loop.

8:20All right.

8:21And then we're just going to use the same HTTP package here, right, the same

8:26HTTP module to make a request to our server that's currently running.

8:31So here's what this is going to look like. We're going to say const HTTP equals

8:36require HTTP.

8:37All right.

8:38And now that we've imported the HTTP package, what we're going to do is say

8:44HTTP dot request.

8:46And the URL that we're going to send this request to is the first argument that

8:50we passed to this function.

8:53And that's just going to be in our case here, HTTP colon slash slash local host

8:59, because this server is running locally on our computer.

9:04That's what local host refers to generally.

9:07And then we have this this colon 3000 thing that refers to the port number.

9:12So again, if we had multiple servers running on our running locally on our

9:18computer, we could change this port number to 4000 5000.

9:228000, 8000, whatever, in order to refer to different services, right, in order

9:28to send our requests to different servers on our computer.

9:32So we're just going to send it to local host 3000 right now.

9:36And basically, that's all that we need to do, right.

9:40And in order to actually send this request, what we need to do is add dot end

9:44on it with parentheses after it.

9:47So basically what this is doing, it's creating this request that it's going to

9:50send to this address, right, this URL.

9:53And then by saying dot end, that's actually going to send it.

9:57So let's hit enter here.

9:59And if we go back to our other terminal now where our server is running, sure

10:03enough, we'll see that it says I received a request.

10:07Now again, this server that we just created isn't really fully functional yet

10:12because it's not sending back any kind of response to the client.

10:16And that's the next step here.

10:18You see, in order to send back a response to the client, we have to actually

10:23use an argument that's going to be passed to this callback function

10:28automatically.

10:29And there's actually two of them.

10:31One is called request and one is called response.

10:33They're usually abbreviated R E Q and R E S. And the R E S one, the response is

10:38what we're interested in here for the time being.

10:42We'll talk about the request argument a little bit later.

10:45But anyway, what this is going to look like is we're going to print out, I

10:48received a request, but then after that in order to send a response back to the

10:54client, right, in most cases, the client will actually think that something

10:58went wrong or think that there was some sort of error if we didn't send back a

11:02response.

11:03What we're going to say is we're just going to say res dot end and we get to

11:07basically pass whatever we want here.

11:10And that will be sent back to the client back to whoever sent the request as a

11:15response.

11:16So let's say response dot end.

11:18And in here, we'll say something like hello from the node JS server.

11:25And if we restart our server now, which we do have to do in order for that

11:29change to take effect, all right, so you can stop it by saying, control C.

11:34And then we just run our server again by saying node core node server.js.

11:40And if we go back to our other terminal now, what we can do is we're actually

11:44going to run this same kind of function again, HTTP dot request dot end.

11:49But in order to actually allow ourselves to see the response, we're going to

11:55add a callback function to this HTTP dot request function.

12:00This is going to be the second argument here.

12:02And basically what this is going to look like is we're going to say response.

12:07All right, so this is the argument that gets automatically passed to this

12:11callback function.

12:13Again, callback functions are a big thing in node JS.

12:16They basically just give us a nice way to handle code in an asynchronous manner

12:22.

12:22And what we're going to do is we're going to say response dot pipe.

12:25And then we're going to say process dot standard out.

12:29Now, basically what this is going to do, don't worry too much about this res

12:32dot pipe thing.

12:34We'll talk about that in more detail later as well as process dot standard out.

12:38But this is just going to take whatever response we get back and print it to

12:42the console.

12:43So let's just hit enter here.

12:45And sure enough, what we see is that it says hello from the node JS server,

12:50right?

12:50It just prints that right to the console there.

12:53And if we go back to our other terminal here, we'll see that our server sure

12:56enough printed out, I received a request.

12:59So that's the basic idea of creating a simple web server using the node JS core

13:06.

13:07And really all that our server is doing right now is it's just handling all

13:12requests that come in by sending back hello from the node JS server.

13:17And this might seem a little bit simplistic, but really the functionality that

13:20you see here is the foundation of building services in node JS.

13:26So anyway, I hope this has been informative for you and I'd like to thank you

13:29for viewing.

13:30[BLANK_AUDIO]

Challenge & Solution: Date and Time Server

0:00All right, so now that we've learned the basics of working with Node.js and we

0:04've seen how to create a simple HTTP server

0:07It's time for us to solidify what we've learned by doing a challenge now

0:12The challenges in this course are going to be a little bit different than some

0:17of the challenges I've done in other courses

0:19Because I'm gonna be trying something new which is something called code spaces

0:24now code spaces in case you've never heard of it

0:26It's still at the time of recording a fairly new

0:29Fairly new thing code spaces are basically an integrated version of visual

0:36studio code that you can use directly on

0:39GitHub it's they're they're really cool. I think you're really gonna like it

0:42and the

0:43The reason I'm using these is because it will allow you to immediately

0:47Access the code that you'll need for the challenge without having to type it

0:52all out yourself

0:53So anyway, let me just show you real quick how to access the code you're going

0:56to need basically what I've done here

0:58Is I've taken the code that I typed out

1:00previously this basic server code and I've created a new GitHub repo around it

1:06and

1:06Basically just pushed all that code up so you can see that there's core node

1:10server and this my file that TXT thing that we

1:12Used for testing purposes previously and if you click on this file you can see

1:17that it contains all that code

1:19Now what you're gonna need to do for this challenge is you're gonna want to

1:24open up a code space on this

1:25Specific commit right what's gonna happen is as I create more and more skills

1:31I'm gonna make changes to this to this repo so you're gonna need just this

1:36commit here

1:37So what you're gonna want to do is click on the commits list there may well be

1:42many more than just one commit by now and

1:46I'm going to click on the server built with no JS core

1:49This is the commit that you're going to need to access here in order to do this

1:55challenge

1:56And actually instead of clicking on that sorry

1:58You're gonna want to click over on this little button here that says browse the

2:02repository at this point in the history

2:04So if we click on this what that's going to do is

2:07Well, if you were seeing something different than what I had here

2:12you should be seeing the exact same thing right now with these two files and

2:16What you can actually do now is in order to open this up in a in an online

2:22editor code spaces

2:24That is you can just click on code and then you should see this button that

2:29says create code space on blah blah blah blah blah

2:31This this long commit hash right that's going to create a code space at this

2:37exact point in the project's history

2:40So that might run for just a minute and then you should see something that

2:44looks an awful lot like visual studio code

2:46Appear in your browser and you can personalize this a little bit as well in

2:51case the

2:52Bright color is hurting your eyes. You can always click on choose the look you

2:56want and then go to browse color themes

2:58And I believe the one that I usually use is um dark plus so there we go

3:04That's much easier on the eyes and oops. I didn't want that one

3:07Let's go back to there and select dark plus again accidentally click something

3:12Uh, so cool at this point you have visual studio code

3:16Basically a version of vs code running in your browser and you may want to zoom

3:22in a little bit as well

3:23There we go just to make it a little bit more readable

3:26and um

3:27What you can do now is because you have both core node server and my file that

3:32txt

3:32You can just run that directly in your terminal here

3:37By saying node core node server

3:40Dot js and then you'll see server is listening on port 3000 now an interesting

3:46thing is since this

3:47Visual studio code is

3:49Not running locally on your computer, right?

3:52It's running presumably on one of github servers

3:54Things might be a little bit different when you go to run the challenges

3:58Um, so what you can actually do it says your application is running on port

4:033000

4:04And uh, if you say open in browser, what that's going to do is it's going to

4:09open a new browser window

4:10That will actually make a request to your server

4:14Uh, through proxy that github sets up, right? So you'll see hello from the no

4:19js server actually displayed in your browser

4:22Um, and really all that's happening here is your browser is

4:25Acting as the client instead of just running a piece of no js code in a

4:30terminal like we were doing before

4:32Now you can also test this thing out by the way

4:35Just by, um doing the same thing that we did before and that is opening up a

4:39new terminal and just saying node

4:41And then uh, you can say something like const hdtp equals require hdtp

4:47All right, and then you can say hdtp dot request and you can send that to hdtp

4:53colon slash slash local host

4:553000

4:58And in order to uh, intercept the request and print it out to the console

5:02You can just say response dot pipe and send that along to process dot standard

5:08out

5:08And oops, let's uh make sure we type that correctly

5:11All right

5:13And then we can say dot end and sure enough we'll see that that has hello from

5:17the no js server printed out to the console as well

5:20So there's no difference if you're going to test it from here

5:22It's only if you're going to uh test it later on from outside

5:28this uh basic visual studio code refracing from outside this code space that

5:32you're going to need to

5:33Um, uh, worry about that and i'll walk you through that when we get there

5:37So i'm just going to close this other browser window there or browser, uh tab

5:41there for the time being

5:43And that's all you should need to know in order to actually uh run this

5:46challenge

5:47So let's actually get down to what this challenge is going to be

5:51And um in order to avoid confusion later, let's just stop our server and uh, we

5:56'll clear out our browser

5:58Or clear out our other terminal as well

6:00What we did previously is we saw how to set up a very simple HTTP server that

6:05sent back

6:05Uh, a pretty useless message saying hello from the no js server

6:10So your challenge here is going to be to make this server do something a little

6:14bit more useful

6:15And send back the current date and time

6:19All right, so in other words

6:20You're going to write that logic inside this callback function

6:24And send back a string to whatever client sent the request

6:27Telling them what the date and time is and uh, in case you don't know how to do

6:33that in javascript

6:34Feel free to google that

6:35All right, so that's your basic challenges to rewrite our server here

6:39So that it will um, send back the date and time instead of just a, uh, useless

6:44string

6:44So, uh, that should take you maybe about a minute or two to complete this

6:48challenge

6:49And once you've made those changes definitely make sure that you actually test

6:54your server out

6:55So that's your challenge in the next video. I'll show you how I solved it

6:58So I hope this has been informative for you and I'd like to thank you for

7:01viewing

7:02[BLANK_AUDIO]

Challenge & Solution: Date and Time Server

0:00All right, so hopefully you've given this challenge a try.

0:03What I'm gonna do in this video is walk you through

0:05how I solve this challenge.

0:06Really, all that you had to do in this case

0:08was rewrite the logic that gets executed

0:11when the server receives a request

0:15so that instead of just printing something out to the console

0:19and sending a string back to the client,

0:22it actually got the current date and time

0:25and sent that back to the client.

0:26So what this looked like is we had to start off

0:29by getting the current date and time.

0:33And in JavaScript, the way that you do that

0:35is by saying new date rather, new date dot.

0:40And then you could either say to date string

0:44or to locale date string,

0:45which takes into account the locale that you're currently in

0:50and prints out the date in the format that you're used to seeing.

0:54So basically we could just take this

0:56and assign it to a variable.

0:58I said const, date and time equals new date dot to local date string.

1:03And in order to send this back to the client,

1:08all we had to do was say response dot end

1:13and in a back tick string here,

1:15which would make the date and time easier to insert.

1:18Nicely, we could say the current time is

1:23or the current date and time is.

1:28And then we could insert date and time like so.

1:32And oops, that needs a dollar sign before it.

1:34There we go.

1:35And that should be all we need to do

1:38in order to modify our server for that purpose.

1:41So let's try running this thing now

1:43and testing it out.

1:44What we're going to do is run our server with node core node server dot JS.

1:49And sure enough, we see server is listening on port 3000.

1:53This thing shows up down here as well.

1:55And we'll do things like make it public a little bit later on in the course.

2:00But let's open up another terminal.

2:03And actually, I did this in reverse here.

2:05We'll just open up whatever the other terminal is that we're not currently

2:07using.

2:08And we're going to run node inside of here.

2:11And then what we'll do is we'll say

2:14the same thing that we did before.

2:16We can just say const HTTP equals request.

2:20Oops, let's try that again.

2:21There we go.

2:22Not request require rather.

2:24HTTP.

2:25And then we can say HTTP dot request.

2:29And then we'll send it to local host.

2:32Oops, HTTP colon slash slash.

2:34That is local host 3000.

2:38And for the response, we'll want to print that out so that we can see it.

2:42We'll say response dot pipe and pipe that to process dot standard out.

2:47And then we can say dot end in order to send that request.

2:50So if we hit enter, sure enough, what we'll see is the current date

2:54and time is.

2:55And oops, that's actually just the date string.

2:57So let me get the time as well.

2:59And actually, what you can do for that is you can say, instead of too local

3:03date

3:03string, which just gives you the date, you can say to ISO string.

3:08And let's just save that and rerun our server here.

3:11We're going to stop it with control C and restart it.

3:15And let's go back now and try running that same command.

3:18You can actually just get up to it again, without having to type it all out

3:22by using the up arrow.

3:23And there we go.

3:24Sure enough, we see that we have this ISO string.

3:27It's a little bit hard to read.

3:28So if you wanted to play around with the formatting there as well, you could

3:31always do that.

3:32But we see that sure enough, 2023, 1125.

3:35And then we have the time here as well.

3:38So anyway, that is the basic solution to the challenge.

3:42Congratulations if you figured that out.

3:44And in case you're looking for other things to do, other things, other ways to

3:49practice this core node server functionality,

3:53I've left a list down below of other potential fairly simple projects that you

3:58could implement.

3:59So I hope this has been informative for you.

4:01And I'd like to thank you for viewing.

4:02[BLANK_AUDIO]

Team training path

Turn this skill into assignable team training

This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.

What's next?

Ready to keep going?

For your team

Bring this training to your team

See how CBT Nuggets helps IT teams close skills gaps, hit compliance targets, and prove training ROI.

Book a Demo
Just need JSNSD?

Learning on your own? Browse individual plans ($49/month, billed annually)

Not ready to buy?
with no purchase required. Already have an account?
Book a Demo