Installing Node.js and Running Your First Node.js Application

Installing Node.js and Running Your First Node.js Application

Daily short news for you
  • Morning news, does everyone remember the lawsuit of Ryan Dahl - or more accurately, the Deno group against Oracle over the name JavaScript?

    Oracle has responded that they are not giving up the name JavaScript 🫣

    https://x.com/deno_land/status/1876728474666217739

    » Read more
  • Are people taking their Tet holidays early or what? Traffic has dropped significantly this whole week 😳. It's a bit sad to talk to myself, so if anyone passes by and reads this, please drop a "comment" for some fun at home. You can say anything since it's anonymous 😇🔥

    » Read more
  • Someone asked me where I get my news so quickly, or how I find so many tools and projects... where do I get all of that? Well, there’s a source far on the horizon but close right in front of you, and that is the Github Trending page.

    This page tracks the repositories that have the most "stars" according to day/week/month. It also allows you to filter by programming language, and each language represents a kind of theme. For example, Python is buzzing about AI, LLMs..., Rust has all the super powerful tools, and Go is... just a continuous plaything 😁. Meanwhile, JavaScript 🫣😑

    » Read more

Node.js is an open-source software that is available for free download on the Node.js download page.

Installation

  • For Windows users, click on the Windows Installer
  • For Mac users, click on the macOS Installer
  • For Linux users, you can install it using a package manager

For example, to install Node.js LTS (v12.x) on Ubuntu, you can run the following commands:

curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

Your First Hello World Program

Running a JavaScript application with Node.js is quite simple. Let's create a file called index.js with the following content:

console.log('Hello World');

Save the file and run the following command in the command line:

node index.js

Output:

Hello World
Premium
Hello

5 profound lessons

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? Click now!

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? Click now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (1)

Leave a comment...
Avatar
Xuân Hoài Tống1 year ago
Ôi bài viết đã từ hơn 3 năm trước
Reply
Avatar
Xuân Hoài Tống1 year ago
Bài viết thật sơ sài 😅
Scroll or click to go to the next page