Инструкция по установке:<div><br></div><div>Надо иметь <font class="Apple-style-span" face="helvetica, arial, freesans, clean, sans-serif"><span class="Apple-style-span" style="font-size: 14px; line-height: 13px; ">python 2.6 или выше, а также libssl-dev.</span></font><br>
<div><pre style="margin-top: 20px; margin-bottom: 0px; padding-top: 6px; padding-right: 10px; padding-bottom: 6px; padding-left: 10px; font: normal normal normal 12px/normal 'Bitstream Vera Sans Mono', Courier, monospace; background-color: rgb(255, 255, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); font-size: 13px; line-height: 19px; overflow-x: auto; overflow-y: auto; border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-left-radius: 3px 3px; ">
<code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal 'Bitstream Vera Sans Mono', Courier, monospace; background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-left-radius: 3px 3px; border-width: initial; border-color: initial; ">git clone git://<a href="http://github.com/joyent/node.git">github.com/joyent/node.git</a>
cd node
git checkout v0.6.2
./configure
make -j2 # -j sets the number of jobs to run
[sudo] make install</code></pre><div><br></div><div>Далее создать сервер example.js:</div><div><pre class="sh_sourceCode" style="font-family: Monaco, 'Andale Mono', 'Lucida Console', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 11pt; color: rgb(195, 204, 136); padding-left: 1em; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(139, 200, 75); line-height: 28px; background-color: rgb(53, 49, 41); ">
<span class="sh_keyword" style="font-style: italic; ">var</span> http <span class="sh_symbol" style="color: rgb(255, 255, 255); ">=</span> <span class="sh_function">require</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">(</span><span class="sh_string" style="color: rgb(185, 204, 197); ">'http'</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">);</span>
http<span class="sh_symbol" style="color: rgb(255, 255, 255); ">.</span><span class="sh_function">createServer</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">(</span><span class="sh_keyword" style="font-style: italic; ">function</span> <span class="sh_symbol" style="color: rgb(255, 255, 255); ">(</span>req<span class="sh_symbol" style="color: rgb(255, 255, 255); ">,</span> res<span class="sh_symbol" style="color: rgb(255, 255, 255); ">)</span> <span class="sh_cbracket" style="color: rgb(255, 255, 255); ">{</span>
  res<span class="sh_symbol" style="color: rgb(255, 255, 255); ">.</span><span class="sh_function">writeHead</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">(</span><span class="sh_number" style="color: rgb(185, 204, 197); ">200</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">,</span> <span class="sh_cbracket" style="color: rgb(255, 255, 255); ">{</span><span class="sh_string" style="color: rgb(185, 204, 197); ">'Content-Type'</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">:</span> <span class="sh_string" style="color: rgb(185, 204, 197); ">'text/plain'</span><span class="sh_cbracket" style="color: rgb(255, 255, 255); ">}</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">);</span>
  res<span class="sh_symbol" style="color: rgb(255, 255, 255); ">.</span><span class="sh_function">end</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">(</span><span class="sh_string" style="color: rgb(185, 204, 197); ">'Hello World</span><span class="sh_specialchar" style="color: rgb(185, 204, 197); ">\n</span><span class="sh_string" style="color: rgb(185, 204, 197); ">'</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">);</span>
<span class="sh_cbracket" style="color: rgb(255, 255, 255); ">}</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">).</span><span class="sh_function">listen</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">(</span><span class="sh_number" style="color: rgb(185, 204, 197); ">14337</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">,</span> <span class="sh_string" style="color: rgb(185, 204, 197); ">"0.0.0.0"</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">);</span>
console<span class="sh_symbol" style="color: rgb(255, 255, 255); ">.</span><span class="sh_function">log</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">(</span><span class="sh_string" style="color: rgb(185, 204, 197); ">'Server running at <a href="http://0.0.0.0:14337/">http://0.0.0.0:14337/</a>'</span><span class="sh_symbol" style="color: rgb(255, 255, 255); ">);</span></pre>
</div><div><br></div><div>Запуск </div><div>node example.js</div><br><div class="gmail_quote">23 ноября 2011 г. 17:09 пользователь Alexey Shrub <span dir="ltr"><<a href="mailto:worldmind@mail.ru">worldmind@mail.ru</a>></span> написал:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Ср., 2011-11-23 at 16:53 +0400, Akzhan Abdulin wrote:<br>
> Вы попробуйте на своем железе ещё Node.JS 0.6 прогнать :)<br>
<br>
</div>Прямо сейчас нет времени разбираться, дадите инструкцию - поставь то-то,<br>
запусти скрипт такой-то, тогда без проблем потестирую<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Moscow.pm mailing list<br>
<a href="mailto:moscow-pm@pm.org">moscow-pm@pm.org</a> | <a href="http://moscow.pm.org" target="_blank">http://moscow.pm.org</a><br>
</div></div></blockquote></div><br></div></div>