Node.js is a cross-platform
, open-source
JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more.
Node.js runs on the V8 JavaScript engine
, and executes JavaScript code outside a web browser
.
Node.js是一个
跨平台
、开源
的JavaScript运行环境,可以在Windows、Linux、Unix、macOS等多个平台上运行。
Node.js基于
V8 JavaScript引擎
,可以在非浏览器环境
下执行 JavaScript 代码。
Node.js lets developers use JavaScript to write command line tools
and for server-side scripting
.
The ability to run JavaScript code on the server is often used to generate dynamic web page content
before the page is sent to the user's web browser
.
Consequently
, Node.js represents a "JavaScript everywhere" paradigm
, unifying web-application development
around a single programming language
, as opposed
to using different languages for the server- versus client-side programming
.
Node.js 允许开发人员使用 JavaScript 编写
命令行工具
和进行服务器端脚本编程
。
在将页面发送至用户的 Web 浏览器之前,通过在服务器上运行 JavaScript 代码,经常用于
生成动态网页内容
。
因此,Node.js 代表着
“JavaScript 无所不在”
的范式,围绕单一编程语言
统一了 Web 应用程序开发,与使用不同语言处理服务器端与客户端编程
相对应。
Node.js has an event-driven architecture
capable of asynchronous I/O
.
These design choices aim to optimize
throughput and scalability in web applications with many input/output operations
, as well as for real-time Web applications
(e.g., real-time communication programs and browser games).
The Node.js distributed development project
was previously governed by the Node.js Foundation
, and has now merged with the JS Foundation
to form the OpenJS Foundation
.
OpenJS Foundation
is facilitated by the Linux Foundation's Collaborative Projects program
.
Node.js具有
事件驱动的架构
,支持异步I/O
。
这些设计选择旨在在具有
大量输入/输出操作
的 Web 应用程序以及实时Web应用程序
(例如实时通信程序和浏览器游戏)中优化
吞吐量和可伸缩性。
Node.js分布式开发项目
以前由Node.js基金会
管理,现已与JS基金会
合并,形成了OpenJS基金会
。
OpenJS基金会
是由Linux基金会的协作项目计划
提供支持。
History
Node.js
was initially written by Ryan Dahl
in 2009, about 13 years after the introduction of the first server-side JavaScript environment
, Netscape's LiveWire Pro Web
.
Node.js
最初是由Ryan Dahl
于2009年编写的,
在
第一个服务器端JavaScript环境
——网景的LiveWire Pro Web
推出大约13年后诞生。
The initial release supported only Linux
and Mac OS X
.
最初版本仅支持
Linux
和Mac OS X
。
Its development and maintenance was led by Dahl
and later sponsored
by Joyent
.
Node.js的开发和维护最初由
Dahl
领导,后来由Joyent
赞助。
Dahl criticized
the limited capability of Apache HTTP Server
to handle many (10,000+) concurrent connections
, as well as the dominant programming paradigm of sequential programming
, in which applications could block entire processes
or cause the creation of multiple execution stacks for simultaneous connections
.
Dahl批评了
Apache HTTP Server
在处理许多(10,000+)并发连接
方面的能力受限,以及占主导地位的编程范式
顺序编程
,在该范式下应用程序可能
阻塞整个进程
或导致为同时连接创建多个执行堆栈
。
Dahl demonstrated
the project at the inaugural European JSConf
on November 8, 2009
.
Dahl在
2009年11月8日
在首届欧洲JSConf
上进行了该项目的演示
。
Node.js combined Google's V8 JavaScript engine
, an event loop
, and a low-level I/O API
.
Node.js结合了Google的V8 JavaScript引擎
、事件循环
和低级I/O API
。