node. js Brief overview

Source: Internet
Author: User

V8 (Google Chrome's JavaScript engine), node. JS is based on the JavaScript runtime environment on the V8 engine and can be seen as a more abstract JS engine.

node. JS uses an event-driven, non-blocking I/O model. (non-blocking I/O:I/O operations do not block the execution of the program, while the I/O operation continues to execute other code.) Event-driven: Each asynchronous event generates an event watcher that invokes the appropriate callback function if an event occurs, or the request completes.

var fs = require ("FS"); Fs.readfile ("./testfile", "UTF8", function (error, file) {       if (error) throw error;       Console.log ("I finished reading the papers!") ");}); Console.log ("I won't be blocked!" ");

node. JS's package management tool NPM. node. js is installed, and NPM is installed with it.

node. js Brief overview

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.