Node.js+express configuration Getting Started tutorial _node.js

Source: Internet
Author: User

Node.js is a JavaScript runtime environment (runtime). It actually encapsulates the Google V8 engine. The V8 engine executes JavaScript very quickly and performs very well. Node.js is optimized for special use cases, providing an alternative API that makes V8 run better in a browser-less environment. Node.js is a platform based on the chrome JavaScript runtime that is used to easily build network applications that respond quickly and easily. Node.js uses event-driven, non-blocking I/O models to be lightweight and efficient, and is ideal for data-intensive, real-time applications running on distributed devices.

Express is a minimalist, flexible Web application Development framework based on the Node.js platform that provides a wide range of features to help you create Web and mobile device applications. Express is also the official recommended web framework.

  Here's how to run a Web site in window environment:

1 Installation Node.js

2 Create a new folder Nodejs_express

3 Open cmd, position to nodejs_express

Copy Code code as follows:

E:\myapp\nodejs_express

4 Project Initialization NPM Init, after the configuration, will generate a file under the folder:

Package.json

5 Install EXPRESS:NPM Install Express, after the installation is successful, will create a node_modules directory under the folder

6 Express Project Initialization Express (express Hello)

7 Install Dependency pack NPM install Serve-favicon Morgan cookie-parser body-parser path;>npm Install Jade

It is simpler to:

Enter the project directory, install the Nodejs dependency module NPM install (CD hello; NPM install)

8 start NPM start and access with 3000 ports on the local IP

The 9 port number can be modified in the Bin/www file

The above is a small set to introduce the node.js+express configuration of the relevant knowledge of the tutorial, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.