Getting started with Node. js + Express configuration, and getting started with node. js

Source: Internet
Author: User
Tags install node

Getting started with Node. js + Express configuration, and getting started with node. js

Node. js is a Javascript runtime environment ). In fact, it encapsulates the Google V8 engine. V8 cited worker to execute Javascript very quickly and with very good performance. Node. js optimizes some special use cases and provides an alternative API to make V8 run better in a non-browser environment. Node. js is a platform based on Chrome JavaScript runtime. It is used to conveniently build fast and scalable network applications. Node. js uses event-driven, lightweight and efficient non-blocking I/O models, making it ideal for data-intensive real-time applications running on distributed devices.

Express is a simple and flexible web application development framework based on the Node. js platform. It provides a series of powerful features to help you create various Web and mobile device applications. Express is also the officially recommended Web framework.

  The following describes how to run a website in the window environment:

1. Install node. js

2. Create a folder nodejs_express

3. Open cmd and go to nodejs_express.

Copy codeThe Code is as follows:
E: \ myapp \ nodejs_express

4. The project initializes npm init. After completing the configuration, a file is generated in the folder:

Package. json

5. install Express: npm install express. After the installation is successful, a node_modules directory is generated in the folder.

6. Express project initialization express (express hello)

7. install the dependency package npm install serve-favicon morgan cookie-parser body-parser path;> npm install jade

Simpler:

Go to the project directory and install the nodejs dependency module npm install (cd hello; npm install)

8. start npm start and use the port 3000 of the local IP address for access.

9. You can modify the port number in the bin/www file.

The above is a small part of the Node. I hope to help you with the introduction to js + Express configuration. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.