Basic nodejs knowledge, basic nodejs tutorial
What is nodejs?
Node. js is a platform based on Chrome javaScript runtime. It is used to conveniently build fast and scalable network applications. (Nodejs is not a javascript application, and nodejs is written in c ++)
Javascript is a scripting language, which requires a parser to run. For JavaScript code written on an HTML page, the browser acts as a parser. Nodejs is a parser for JS that needs to run independently.
Each parser is a running environment and can do the following:
1. Allows JS to define various data structures and perform operations;
2. Allows JS to use the built-in objects and methods provided by the runtime environment.
Example:Javascript running in a browser is used to operate DOM. the browser provides built-in objects such as document.
JS running in nodejs is used to operate disk files or build an HTT server. nodejs provides built-in objects such as fs and http.
Nodejs features:
1. It is a JavaScript Runtime Environment
2. Code explanation based on Chrome V8 engine
3. event-driven
4. asynchronous I/O (non-blocking I/O)
5. Events and callbacks (lightweight and scalable, suitable for real-time data interaction applications)
6. Single process, single thread
7. cross-platform
Http://www.bkjia.com/article/104455.htm (detailed explanation of nodejs features)
The above is all the content of this article. I hope this article will help you in your study or work. I also hope to provide more support to the customer's home!