The node. JS Web Development Environment Build note under Windows 7

Source: Internet
Author: User
Tags windows 7 x64 install node joyent

Try to create a Web application using node. js on IBM Bluemix in the near future. Therefore, we need to build a local node. JS Web Development test environment.

Here is the building method under Windows, please refer to the small partners using CentOS :
node. JS Web Development Environment Build notes underCentOS 6.5

What is node. js? let's see what the encyclopedia says.

JavaScript is a script that executes in the browser, it's simple and lightweight. Easy to edit, such script pass is often used in the browser's front-end programming. But a developer Ryan discovered one day that such a front-end scripting language could be executed on the server. A storm that swept the world started.
node. JS is a platform built on chrome JavaScript execution to easily build responsive, easy-to-scale Web applications. node. js is lightweight and efficient with event-driven, non-clogging I/O models, and is ideal for data-intensive, real-time applications that are executed on distributed devices.
Node is a JavaScript execution Environment (runtime).

It actually encapsulates the Google V8 engine. The V8 engine executes JavaScript very fast and performs well. Node optimizes some of the special use cases. Provides an alternative API that enables V8 to perform better in a non-browser environment.

Do you understand me?

Seriously, I didn't read it!

So what exactly is node. js?

Web back-end development language, do you understand this?

ASP, JSP, PHP is what you do not understand?

All right. Do you want to use JS to access the database to process user requests?

===============================================

node. JS is an open source project and its founder is Ryan Dahl. Later this open source project was very hot, joyent the company noticed node. js. decided to sponsor the project. Ryan Dahl joined the company in 2010 and was full-time responsible for the development of the node. JS Project.

With regard to node. JS, several important developers ran away due to joyent management issues. On the other side of the hill, an open source project called Io.js was started. Its community was once very active. Just September 15, 2015, Io.js and node. js were again fit, and node. JS v4.0.0 announced.

Download node. JS Website Address: https://nodejs.org/en/

You can directly click on the link to enter:


My is the Windows 7 x64 system, choose the version number is: v4.2.4 LTS, relatively more mature and reliable version number.

Install node. js

Follow the steps to install it, there is nothing to say. Stickers are just a visual impression of not touching!








When the installation is complete, a node. js folder is added to the Start menu. For example, as seen in:


Click Node. js. Open a command-line form and enter "OS" to try it out


The first of the webserver


Contact more, found a lot of language in the Web development time is able to write webserver based on the language itself!

The go language is so. The Python language is so, so is node. js;

But usually we may not do this when the project is developed. Because there is usually a better server framework to use.

Save the following code as a "helloworld.js" file:

var http = require (' http '); var server = Http.createserver (function (request, response) {  response.end ("Hello world!"); }); Server.listen (8080);
A webserver just a few lines of code?

Yes, that's right!!

Just this is a mentally retarded webserver, it just returns "Hello world!".

Require for many front-end small partners should be more familiar with it just now?

only JS can be. You can be a master of web development front-end + backend .

Open the command line and switch to the Save folder for the "Helloworld.js" file. Execution: Node Helloworld.js

Assuming you have the firewall turned on, you should see:


Click Agree to interview. Open your browser and enter "http://localhost:8080/" to see it!


Summary

In this case, the node. JS Web development environment is built. It's so simple. You try it, too.

===================================================================================

The company has a new female colleague, 88, Henan. Two years younger than me. We have a good relationship and we talk about everything.

One day to talk to love, I asked her: "Have you ever had a boyfriend?" She said, "I had it in high school." "I Know why:" Is it in Henan? "She was surprised:" Of course, and the man!


The node. JS Web Development Environment Build note under Windows 7

Related Article

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.