Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Choosing a Node.js installation process

From: Node.js Essential Training

Video: Choosing a Node.js installation process

Installing Node can be simple and predetermined or it could be customized to suit your needs. Let's take a look at the available options. So, first I'm at nodejs.org. And this is where you can install Node via a precompiled binary. All you have to do is click this install button and it will automatically download the precompiled binary for your computer. There are a couple of advantages with using a precompiled binary. The first advantage is that it's easy. It's a wizard based installation. If you've installed any other software on your computer before, it's likely to be a very familiar process for you.

Choosing a Node.js installation process

Installing Node can be simple and predetermined or it could be customized to suit your needs. Let's take a look at the available options. So, first I'm at nodejs.org. And this is where you can install Node via a precompiled binary. All you have to do is click this install button and it will automatically download the precompiled binary for your computer. There are a couple of advantages with using a precompiled binary. The first advantage is that it's easy. It's a wizard based installation. If you've installed any other software on your computer before, it's likely to be a very familiar process for you.

The other advantage is that it's automatic. It's going to configure the environment for you. You don't have to look for hidden files and type in a bunch of commands that you're not going to be familiar with. The installer is going to automatically configure everything for you. There are also a few disadvantages of using precompiled binaries. The first is that whenever there is an update to Node, you have to download the package and go through the wizard again. And another related disadvantage is that switching between different versions of Node involves going through the entire installation process.

So, if you want to test something on different versions of Node. You have to go through the entire wizard all over again just to make that test. So let's take a look at another installation process. Another way of installing Node on your computer is to use a version manager. This is the github page for Node version manager, NVM. It's the version manager that I personally prefer to use. There are several advantages of using a version manager. The first advantage is it allows you to install any version of Node with a a short command.

All you have to do is type in that command. And the version you want, and it will automatically download and install that version of node on your computer. Another advantage is that switching between versions is as simple as issuing another short command. So again, you just type in that command, specify the version that you want, and it will do all the rest for you And the final advantage of using a version manager is that it provides an easy, consistent way of installing Node on Linux. There are however, some disadvantages with using a version manager.

One disadvantage is that there's no wizard-based installation. You have to be reasonably comfortable with command line interfacees for this to work. Now, node uses the command line for a few other things as well. So familiarity with a command line interface is also going to be helpful as you use Node. Another disadvantage is that you may have to reinstall your global modules whenever you switch between different versions of Node. We'll be talking about global modules later in the course. But they're generally commands that you will install on top of Node.

Another disadvantage is that you have to install the version manager before you use it to then go and install Node, so in this case you are installing two things rather than just installing Node itself. Finally, there is one more way to install Node on your computer and that's to actually compile it from source. This git-hub page is where all of the code for Node is hosted. There are some advantages to compling from source. The first advantage is that you can test the very latest code from the Node development team. So if you want to be on the cutting, bleeding edge of what Node is doing you can get it and compile it.

The other advantage is that you can customize the installation. So if you have specific needs for your computer, for instance if you are using a very obscure operating system, or you have very specific ways that you want to have Node configured, this might be the best way to get it on your computer. There are also some disadvantages of compiling from source. First of all, you have to be familiar with the compilation process. Now if you've compiled other things on your computer before, compiling Node is going to be very similar. But if you're not familiar with the process, it can be a little bit daunting at first.

Another disadvantage is that it's going to take longer to install. Whenever you compile code, you have to read it, and parse it, and build it and make it. And then get it installed on the computer. And this process is going to take a while. And the final disadvantage is that, it's not as easy to switch between different versions as it is when you use a version manager. Whenever you want to switch to a different version, and you've compiled node, you're going to have to go through that compilation process all over again. So, which of these three processes do I use? I personally use a version manager.

It gives me the flexibility of switching Node versions whenever I need to. There are sometimes when I'm debugging code and I want to see if it behaves differently under a different version. I find the command line to be convenient and that allows me to update Node with just one command. Now there's nothing wrong with using a precompiled binary or compiling your own copy from source. But I find that a version manager works best for my needs. So in the next few videos we'll take a look at installing Node using precompiled binaries as well as using a version manager.

You can watch the one you prefer to use or you can watch both methods and see which one suits you best.

Show transcript

This video is part of

Image for Node.js Essential Training
Node.js Essential Training

52 video lessons · 12674 viewers

Joseph LeBlanc
Author

 
Expand all | Collapse all
  1. 3m 9s
    1. Welcome
      42s
    2. What you should know before watching this course
      57s
    3. Using the exercise files
      47s
    4. Using the challenges
      43s
  2. 18m 50s
    1. Why use Node.js?
      2m 1s
    2. Choosing a Node.js installation process
      4m 56s
    3. Installing Node.js on the Mac
      2m 5s
    4. Installing Node.js on Windows
      1m 43s
    5. Installing Node.js via Node Version Manager on Ubuntu Linux
      4m 45s
    6. Installing Node.js via Node Version Manager on a Mac
      3m 20s
  3. 13m 54s
    1. Exploring language additions to the V8 JavaScript engine
      3m 38s
    2. Understanding require() and modules
      6m 39s
    3. Understanding callback execution in the event loop
      3m 37s
  4. 12m 23s
    1. Initializing Node.js projects
      2m 37s
    2. Finding an NPM
      3m 30s
    3. Maintaining projects using the npm command
      6m 16s
  5. 21m 4s
    1. Creating modules with getters and setters
      6m 33s
    2. Understanding module caching and scopes
      6m 15s
    3. Implementing JavaScript creational patterns
      5m 8s
    4. Challenge: Leveraging module caching
      55s
    5. Solution: Leveraging module caching
      2m 13s
  6. 32m 27s
    1. Starting Express applications
      3m 42s
    2. Handling GET requests returning JSON
      3m 26s
    3. Navigating large datasets using request variables in routes
      5m 4s
    4. Modifying data through PUT requests
      4m 32s
    5. Supplying middleware to modify HTTP response headers
      4m 37s
    6. Generating HTML views in Jade
      8m 9s
    7. Challenge: List all records as JSON
      37s
    8. Solution: List all records as JSON
      2m 20s
  7. 25m 37s
    1. Evaluating unit testing methodologies
      3m 8s
    2. Isolating existing code for testing
      6m 47s
    3. Supplying helpers for test data
      2m 35s
    4. Writing unit tests with Mocha
      6m 5s
    5. Simulating HTTP requests with SuperTest
      7m 2s
  8. 28m 45s
    1. Connecting to MongoDB via Mongoose
      4m 16s
    2. Defining schemas for collections in Mongoose
      3m 47s
    3. Querying MongoDB collections
      5m 32s
    4. Persisting Express sessions through MongoDB and mongo-connect
      7m 6s
    5. Logging in to Express applications using Passport
      8m 4s
  9. 21m 47s
    1. Controlling the built-in REPL
      4m 18s
    2. Constructing a custom REPL
      5m 40s
    3. Receiving command-line arguments with Optimist
      6m 14s
    4. Building command-line tools
      3m 35s
    5. Challenge: Launch a custom REPL from a command
      41s
    6. Solution: Launch a custom REPL from a command
      1m 19s
  10. 15m 46s
    1. Emitting events and attaching listeners
      5m 32s
    2. Streaming chunked data through readable streams
      2m 33s
    3. Controlling readable streams
      1m 52s
    4. Piping readable data into writable streams
      2m 10s
    5. Handling duplex streams over TCP
      3m 39s
  11. 4m 6s
    1. Deploying projects to cloud hosting services
      2m 36s
    2. Finding Node.js resources
      1m 30s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Node.js Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.