Касательно Redis: Сперва ставим менеджер пакетов npm
curl http://npmjs.org/install.sh | sh Далее ставим пакеты для Redis: npm install hiredis redis Далее создать сервер example.js: var http = require('http'), redis = require('redis'), url = require('url');var redisClient = redis.createClient(); http.createServer(function (req, res) { var reqUrl = url.parse(req.url, true); if (req.method !== 'GET' || reqUrl.pathname !== '/') { res.writeHead(412, {'Content-Type': 'text/plain'}); res.end('Bad Request\n'); return; } res.writeHead(200, {'Content-Type': 'text/plain'}); var tid = reqUrl.query.tid; redisClient.set(tid, JSON.serialize(reqUrl.query), function() { res.end('SET!\n'); });}).listen(14337, "0.0.0.0"); console.log('Server running at http://0.0.0.0:14337/'); 24 ноября 2011 г. 15:36 пользователь Akzhan Abdulin < [email protected]> написал: > Инструкция по установке: > > Надо иметь python 2.6 или выше, а также libssl-dev. > > git clone git://github.com/joyent/node.git > cd node > git checkout v0.6.2 > ./configure > make -j2 # -j sets the number of jobs to run > [sudo] make install > > > Далее создать сервер example.js: > > var http = require('http'); > http.createServer(function (req, res) { > res.writeHead(200, {'Content-Type': 'text/plain'}); > res.end('Hello World\n');}).listen(14337, "0.0.0.0"); > console.log('Server running at http://0.0.0.0:14337/'); > > > Запуск > node example.js > > 23 ноября 2011 г. 17:09 пользователь Alexey Shrub <[email protected]>написал: > > On Ср., 2011-11-23 at 16:53 +0400, Akzhan Abdulin wrote: >> > Вы попробуйте на своем железе ещё Node.JS 0.6 прогнать :) >> >> Прямо сейчас нет времени разбираться, дадите инструкцию - поставь то-то, >> запусти скрипт такой-то, тогда без проблем потестирую >> >> -- >> Moscow.pm mailing list >> [email protected] | http://moscow.pm.org >> > >
-- Moscow.pm mailing list [email protected] | http://moscow.pm.org
