Mean tutorial 2-nodejs Installation

Source: Internet
Author: User

The simplest way to install a stable version of node. JS is to use a binary file, which is available on the node. JS Official website
Available for Linux, Mac OS x, and Windows systems. Also, be aware of downloading files that are consistent with the target operating system architecture.

If you're using Windows and Linux, pay attention to the 32-bit and 64-bit versions. Security-based considerations, MAC
Users should choose the 64-bit version is appropriate.

The version number mode of node. JS is consistent with MongoDB, and the version number is even, stable version, such as 0.8.x
And 0.10.x are stable, while 0.9.x and 0.11.x are not used in production environments. Currently the latest stable version is
0.10.x.

Installing node. js on Windows is a simple task that can be done with a separate setup program. The first step,
Download the correct. msi file on the http://nodejs.org/download/, note that there are 32-bit and 64-bit versions of the distinction, select when downloading
The version corresponding to the operating system architecture.
Run the downloaded installer, and if a security Warning window pops up, click Run to start the Installation Wizard and click Next to start the installation.

After the installation is complete, node. js can be used through the command line interface (Commond-line INTERFACE,CLI) provided by node. js.

Execute the following command in the command-line tool:
$ node
This launches the node. JS command-line interface, which can receive input from JavaScript statements. Test whether the installation was successful,
Run the following command:
> Console.log (' Node is up and running! ');
Node is up and running!
Undefined
Successful execution! But it's best to try out the JavaScript file again. Create a file named Application.js, and then
Enter the following code in the file:
Console.log (' Node is up and running! ');
Execute the following command to set the above file name to the first parameter of the node command line interface to run the file:
$ node Application.js
Node is up and running!
Execution Done! Your first node. JS app was created successfully. Use Ctrl+d or CTRL + C to exit the node command line interface.

Mean tutorial 2-nodejs Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.