关于Node.js
阅读说明:本文借鉴了后文末尾列出的学习资料的相关内容,鼠标指上某些文本会有一些提示。分享促进进步~ 1 概述 1.1 定义 Node.js 官方网站 给出了如下定义: Node.js is a platform built on Chrome's JavaScript runtime for easily building fast , scalable network applications. Node.js uses an event-driven , non-blocking I/O model that makes it lightweight and efficient , perfect for data-intensive real-time applications that run across distributed devices. Node.js 是建立在 Chrome 的 JavaScript 运行时环境上的平台,目标是为能够简单地构建快速、可扩展的网络应用程序。 Node.js 利用事件驱动、非阻塞 I/O 模型的特点使得它能够轻量级、高效并且完美地应对分布式设备上运行的数据密集型实时应用程序。 1.2 特点 Node.js 最为关键的三个特点: 非阻塞 I/O 事件驱动 单线程 1.2.1 非阻塞 I/O 我们知道在操作系统中