nodejs一周动态(2011-04-25 - 05-01)
发布于 13 年前 作者 fengmk2 5515 次浏览 最后一次编辑是 8 年前

本文收集一周来业界关于nodejs的相关动态信息和新闻摘要,并会推荐一下非常棒的node.js模块。 <br/><h2><a href=“http://www.zdnetasia.com/mozilla-jumps-into-node-js-server-project-62208463.htm”>Mozilla jumps into Node.js server project</a></h2> <br/>Mozilla也对Node.js感兴趣了,已经着手为Node.js提供V8以外的另一个引擎: <br/><a href=“http://blog.zpao.com/post/4620873765/about-that-hybrid-v8monkey-engine”>SpiderNode</a>: This JavaScript engine in Firefox is called SpiderMonkey, and the hybrid technology used in SpiderNode is called V8Monkey <br/> <br/>Node.js is built with the V8 JavaScript engine from Google’s Chrome browser, but Mozilla is transplanting Firefox’s JavaScript technology in a project called SpiderNode. (The JavaScript engine in Firefox is called SpiderMonkey, and the hybrid technology used in SpiderNode is called V8Monkey.) <br/><h2><a href=“http://www.readwriteweb.com/hack/2011/04/build-desktop-apps-with-nodejs.php”>Build Desktop Apps with Node.js Using WebApp</a></h2> <br/>Node.js contributor Tim Caswell pushed an initial release of WebApp, a framework for building desktop GUI apps with Node.js, to GitHub. The stated goal is to “Give node developers a way to have a desktop GUI to their node servers using HTML5 + CSS3 as the GUI platform.” <br/>Node.js也可以开发桌面程序! <br/><h2><a href=“http://blog.nodejs.org/2011/04/23/node-v0-4-7/”>Node v0.4.7 release</a></h2> <br/><ul> <br/> <li>Don’t emit error on ECONNRESET from read() #670</li> <br/> <li>Fix: Multiple pipes to the same stream were broken #929 (Felix Geisendörfer)</li> <br/> <li>URL parsing/formatting corrections #954 (isaacs)</li> <br/> <li>make it possible to do repl.start(’’, stream) (Wade Simmons)</li> <br/> <li>Add os.loadavg for SunOS (Robert Mustacchi)</li> <br/> <li>Fix timeouts with floating point numbers #897</li> <br/> <li>Improve docs.</li> <br/></ul> <br/>Download: <a href=“http://nodejs.org/dist/node-v0.4.7.tar.gz”>http://nodejs.org/dist/node-v0.4.7.tar.gz</a> <br/>Website: <a href=“http://nodejs.org/docs/v0.4.7/”>http://nodejs.org/docs/v0.4.7/</a> <br/>Documentation: <a href=“http://nodejs.org/docs/v0.4.7/api”>http://nodejs.org/docs/v0.4.7/api</a> <br/><h2>Cluster Live</h2> <br/>TJ Holowaychuk released <a href=“http://tjholowaychuk.com/post/4712080732/cluster-live-0-0-1”>Cluster Live</a> (GitHub: <a href=“https://github.com/visionmedia/cluster-live”>visionmedia / cluster-live</a>, MIT License), which is a realtime administration and statistics plugin for Cluster. If you’ve been holding off on Cluster, this is probably the sort of usage TJ envisioned for it and may convince you to use it. <br/> <br/>你只需要一点点配置代码,就可以使用了,很cool吧!: <br/><pre escaped=“true”>var live = require(‘cluster-live’); <br/> <br/>cluster(server) <br/>  .set(‘workers’, 6) <br/>  .use(cluster.debug()) <br/>  .use(cluster.stats({ connections: true, lightRequests: true })) <br/>  .use(live()) <br/>  .listen(3000); <br/></pre> <br/>截图 <br/> <br/><img src=“https://d3nwyuy0nl342s.cloudfront.net/img/5dc84aecefb12aa6a2410137e8e48b2ec5241c50/687474703a2f2f662e636c2e6c792f6974656d732f3045306530513161336a317233723335334731592f53637265656e73686f742e706e67” alt="" width=“90%” height=“300” /> <br/><h2>Capsule</h2> <br/><a href=“https://github.com/andyet/capsule”>Capsule</a> (MIT License) by Henrik Joreteg is a Node framework that uses Socket.io and Backbone.js to synchronise models between the client and server. He’s written some documentation for <a href=“http://andyet.github.com/Capsule/docs/capsule.models.html”>Capsule.models.js</a> and <a href=“http://andyet.github.com/Capsule/docs/capsule.views.html”>Capsule.views.js</a>, and the README includes a detailed example of how to set things up for the server and browser. <br/><h2><a href=“https://github.com/nodejitsu/node-http-proxy”>node-http-proxy</a></h2> <br/><a href=“https://github.com/nodejitsu/node-http-proxy”>node-http-proxy</a>: <br/>一个基于nodejs全功能http代理 <br/>A full-featured http proxy for node.js <br/><h3>Features</h3> <br/><ul> <br/> <li>Reverse proxies incoming http.ServerRequest streams</li> <br/> <li>Can be used as a CommonJS module in node.js</li> <br/> <li>Uses event buffering to support application latency in proxied requests</li> <br/> <li>Reverse or Forward Proxy based on simple JSON-based configuration</li> <br/> <li>Supports WebSockets</li> <br/> <li>Supports HTTPS</li> <br/> <li>Minimal request overhead and latency</li> <br/> <li>Full suite of functional tests</li> <br/> <li>Battled-hardened through production usage @ nodejitsu.com</li> <br/> <li>Written entirely in Javascript</li> <br/> <li>Easy to use API</li> <br/></ul> <br/><h3>When to use node-http-proxy</h3> <br/>Let’s suppose you were running multiple http application servers, but you only wanted to expose one machine to the internet. You could setup node-http-proxy on that one machine and then reverse-proxy the incoming http requests to locally running services which were not exposed to the outside network. <br/><h2>npm 1.0: Released</h2> <br/><a href=“http://blog.nodejs.org/2011/05/01/npm-1-0-released/”>npm 1.0 has been released</a>. Here are the highlights: <br/><ul> <br/> <li>Global vs local installation</li> <br/> <li>ls displays a tree, instead of being a remote search</li> <br/> <li>No more “activation” concept – dependencies are nested</li> <br/> <li>Updates to link command</li> <br/> <li>Install script cleans up any 0.x cruft it finds. (That is, it removes old packages, so that they can be installed properly.)</li> <br/> <li>Simplified “search” command. One line per package, rather than one line per version.</li> <br/> <li>Renovated “completion” approach</li> <br/> <li>More help topics</li> <br/> <li>Simplified folder structure</li> <br/></ul> <br/>

回到顶部