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!