Instructions for installing Node.js
Install Node.js internally
If you want to set up node.js environment on your personal computer, you must have 2 software on your computer. That is: 1) Text Editor (for example: Nodepad ++); 2) binary Nodejs installer.
Text Editor
It will be used to edit your program. For example, some Editor on Windows like Nodepad, vi or vim (on Linux) .
The file you create on your editor is called a source file (source file) and contains source code programs. Source files for Node.js are often named with the ".js" extension format.
Before starting this program, make sure you have a used text editro and experience in writing computer programs, storing files and executing it.
Install Node.js Runtime
Your source code is written in simple Javascript snippets. The Node.js interpreter will be used to compile and execute Javascript code.
Nodejs installed versions are available for 32-bit and 64-bit operating systems of Linux, Mac, Window .
The following section explains the steps to install Node.js binary on different operating systems.
Download Node.js
Download the latest version of Node.js from the Node.js Downloads page. At the time of this tutorial, the latest versions correspond to the following operating systems:
OSArchive nameWindows node-v0.12.0-x64.msi Linux node-v0.12.0-linux-x86.tar.gz Mac node-v0.12.0-darwin-x86.tar.gz SunOS node-v0.12.0-sunos-x86. tar.gzInstall Node.js on UNIX / Linux / Mac OS X, and SunOS
Based on the operating system architectures, downloading and extracting node-v0.12.0-osname.tar.gz in the / tm directory and finally extracting it into the / usr / local / nodejs directory. For example:
$ sudo apt-get install nodejs
Add / usr / local / nodejs / bin to the PATH environment variable:
OS ResultLuxux export PATH = / usr / local / nodejs / bin Mac export PATH = $ PATH: / usr / local / nodejs / bin FreeBSD export PATH = $ PATH: / usr / local / nodejs / binInstall Node.js on Windows
Use MSI file and follow the instructions that appear when installing Node.js. By default, the Node.js installer is stored at C: Program Filesnodejs.
Does the Node.js installation process succeed?
Create a js file named main.js on the computer (Windows or Linux) with the following code:
/* Hello, World! Vi du kiem tra cai dat node.js */ console . log ( "Hello, World!" )
Now execute main.js using the Node.js compiler to see the results:
$ node main . js
If everything succeeds, after compiling it will produce the result:
Hello, World!
According to Tutorialspoint
Last lesson: What is Node.js?
Next lesson: Module in Node.js
You should read it
May be interested
- Instructions for installing Minecraft texture packsinstructions for installing minecraft texture packs, instructions for installing texture packs in minecraft, suggesting some unique packages, helping to have a new minecraft playing experience
- Instructions for installing MS SQL Serverthis is a step by step guide to installing ms sql server.
- Instructions for installing Flash Player for browsers on computersinstructions for installing flash player for browsers on computers. flash player is a commonly used browser to run flash content like videos or web games. if your computer does not have flash player installed then of course we cannot view the video
- Instructions for installing GIT and configuring GIT on Windows 10how to install and configure git on windows 10 the most standard. link download git for the latest windows operating system, basic configuration for git on windows.
- Instructions for using and installing new computersyou have researched and bought a new computer. now, when he brought it home and must be very eager to start using it to send email, share photos, surf the web, listen to music and watch movies.
- Instructions for installing Scratch offlinescratch allows you to program creative interactive programs and share them with the community. if you want to use it without an internet connection, see the instructions for installing scratch offline on your computer below.
- Instructions for installing Windows 11, installing Windows 11 using ISO filewindows 11 is officially leaked and you can even install it right now.
- Instructions for installing and using Google Drive on phones and computersinstructions for installing and using google drive on phones and computers. google drive cloud storage service is one of the most used services today. using google drive, you get free 15gb of storage and pay for the software
- Instructions for downloading and installing WinToHDD, installing Win without USBinstructions for downloading and installing wintohdd - software that supports windows installation without using a cd or usb boot. download and install wintohdd to your computer to install windows 11, 10, 8.1,... more quickly and easily in case you don't have a usb or win installation cd.
- How to use AWS DynamoDB in a Node.js applicationone of the solutions that amazon web services (aws) offers is dynamodb, a tool that revolutionizes data management.