天天看点

nodejs安装记录

nodejs教程:

<a href="http://www.nodebeginner.org/index-zh-cn.html#event-driven-callbacks">http://www.nodebeginner.org/index-zh-cn.html#event-driven-callbacks</a>

官网

<a href="http://nodejs.org/#">http://nodejs.org/#</a>

安装

<a href="https://github.com/joyent/node/wiki/installation">https://github.com/joyent/node/wiki/installation</a>

understanding node.js

<a href="http://debuggable.com/posts/understanding-node-js:4bd98440-45e4-4a9a-8ef7-0f7ecbdd56cb">http://debuggable.com/posts/understanding-node-js:4bd98440-45e4-4a9a-8ef7-0f7ecbdd56cb</a>

安装nodejs的时候会出现这个错误:

file "./configure", line 266

o['default_configuration'] = 'debug' if options.debug else 'release'

^

syntaxerror: invalid syntax

这个是你的python版本不够或者没有安装

<a href="https://groups.google.com/forum/#!msg/nodejs/b8ncojauipc/xixcmnsmoqgj">https://groups.google.com/forum/#!msg/nodejs/b8ncojauipc/xixcmnsmoqgj</a>

请去这边安装:

<a href="http://python.org/download/">http://python.org/download/</a>

出错:

importerror: no module named bz2

<a href="http://297020555.blog.51cto.com/1396304/593224">http://297020555.blog.51cto.com/1396304/593224</a>

理解函数式编程:

<a href="http://steve-yegge.blogspot.jp/2006/03/execution-in-kingdom-of-nouns.html">http://steve-yegge.blogspot.jp/2006/03/execution-in-kingdom-of-nouns.html</a>

server是单进程的,前往不能调用阻塞进程的操作

npm安装要在本目录下安装,使用npm install xxx

会在本目录下自动生成node_modules目录,这样才算安装成功

nodejs的事件机制

nodejs是事件驱动的,你可以在事件上进行监听,比如request就可以注册两个end和data事件,哪些对象有哪些事件可以监听应该看。更多知识可以看《nodejs手册中文版》

下载地址:

<a href="http://ishare.iask.sina.com.cn/f/21982872.html">http://ishare.iask.sina.com.cn/f/21982872.html</a>