发布于 2015-02-07 01:02:27 | 171 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的Node.JS入门教程,程序狗速度看过来!

Node.js 服务器端的JavaScript

Node.js 是一个基于Chrome JavaScript 运行时建立的一个平台, 用来方便地搭建快速的 易于扩展的网络应用· Node.js 借助事件驱动, 非阻塞I/O 模型变得轻量和高效, 非常适合 运行在分布式设备 的 数据密集型 的实时应用


Node.js v0.12.0 (Stable) 发布,此版本相比 0.10 版本有较大的改进,详细改进请看 wiki。请注意,此版本包括 API 更新,需要更新大量依赖。

此版本值得关注的特性如下:

  • Streams 3

    • The Streams implementation now works the way you thought it already should, without introducing any changes to the API. Basically this means no more getting stuck in "old mode", there are only streams that are flowing or not.

    • Streams now support the use of cork and uncork mechanisms to prevent flushing writes out to the system if an application is going to be performing many writes in a row. There is an implicit uncork performed when you end a writable stream.

  • HTTP

    • maxSockets are no longer limited to 5. The default is now set toInfinity with the developer and the operating system given control over how many simultaneous connections an application can keep open to a given host.

    • Proper KeepAlive support means that sockets will stay open until they timeout at the configured time, are closed by the remote side, or the process exits. Developer's no longer have to make sure requests have been pipelined to keep the socket open, or use an alternative module to get that support.

    • Developers can also now explicitly flushHeaders to ensure time to first byte is low and proxied connections are held open.

  • Cluster

    • Now has two modes of operation, the new default is a round robin distribution mechanism where the master accepts new connections and distributes them to your workers. If you want you can still opt back into the old method where your workers are responsible for acception connections.

  • TLS

    • We have the new TLSWrap mechanism under the hood, this eliminates quite a few of the hops back and forth between JavaScript and our C++ implementations.

    • Added APIs for asynchronous SNI callbacks, OCSP stapling, and storage events.

  • Buffer

    • We use a more accurate mechanism for allocating memory for buffers now, which means you'll see less overhead and impact from holding onto to small slices of Buffers. This reduces the amount of memory pressure on the system, which means GC runs are quicker, which means Node.js is on CPU less, and thus lower latency for your applications.

  • child_process

    • spawnSync/execSync have been added to facilitate synchronous child processes, warning your node process won't make forward progress while waiting for the child to exit, caveat emptor!

  • Crypto

    • Added APIs for loading custom engines for use with compiled in OpenSSL.

    • More APIs support supplying the pass phrases.

    • Added APIs for RSA public/private key encryption/decryption.

  • VM

    • The module is now based on the Contextify module, which shares values from the sandbox to avoid missing changes inside the execution from appearing in the parent context.

  • 初步支持 ECMAScript Internationalization API 1.0 (ECMA-402)

    • By default, Node.js v0.12.0 binaries are shipped with ECMA-402 support, but only for the English language. In other words, the ECMA-402 API is working as you would expect, but only data for the English language is included. You can find more info on how to include more languages in the Wiki.

相关资源:

源代码:http://nodejs.org/dist/v0.12.0/node-v0.12.0.tar.gz

Macintosh Installer (Universal): http://nodejs.org/dist/v0.12.0/node-v0.12.0.pkg

Windows Installer: http://nodejs.org/dist/v0.12.0/node-v0.12.0-x86.msi

Windows x64 Installer: http://nodejs.org/dist/v0.12.0/x64/node-v0.12.0-x64.msi

Windows x64 Files: http://nodejs.org/dist/v0.12.0/x64/

Linux 32-bit Binary: http://nodejs.org/dist/v0.12.0/node-v0.12.0-linux-x86.tar.gz

Linux 64-bit Binary: http://nodejs.org/dist/v0.12.0/node-v0.12.0-linux-x64.tar.gz

Solaris 32-bit Binary: http://nodejs.org/dist/v0.12.0/node-v0.12.0-sunos-x86.tar.gz

Solaris 64-bit Binary: http://nodejs.org/dist/v0.12.0/node-v0.12.0-sunos-x64.tar.gz

Other release files: http://nodejs.org/dist/v0.12.0/

网站:http://nodejs.org/docs/v0.12.0/

文档:http://nodejs.org/docs/v0.12.0/api/



历史版本 :
Node.js v8.9.4 (LTS) 发布,可以从任何目录配置
Node.js v6.12.3 (LTS) 发布,可以从任何目录配置
Node.js 9.3.0 发布,服务器端 JavaScript 运行环境
Node.js v9.2.1,v8.9.3, v4.8.7 发布
Node.js v6.12.2 “Boron”(LTS) 发布,修复漏洞
Node v8.9.2 和 v6.12.1 长期支持版发布
Node.js v9.2.0 发布,服务器端 JavaScript 运行环境
Node v8.9.1 (LTS) 发布,服务器端 JavaScript 运行环境
Node.js v9.1.0 发布,服务器端 JavaScript 运行环境
Node.js v9.0.0 发布,服务器端 JavaScript 运行环境
Node 8.8.0、6.11.5 和 4.8.5 发布,你在用哪版?
Node.js v8.7.0 发布,服务器端 JavaScript 运行环境
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务